style: ruff format mempalace/palace.py
Add blank lines after inline imports in mine_lock. Pure formatting.
This commit is contained in:
@@ -69,18 +69,22 @@ def mine_lock(source_file: str):
|
|||||||
try:
|
try:
|
||||||
if os.name == "nt":
|
if os.name == "nt":
|
||||||
import msvcrt
|
import msvcrt
|
||||||
|
|
||||||
msvcrt.locking(lf.fileno(), msvcrt.LK_LOCK, 1)
|
msvcrt.locking(lf.fileno(), msvcrt.LK_LOCK, 1)
|
||||||
else:
|
else:
|
||||||
import fcntl
|
import fcntl
|
||||||
|
|
||||||
fcntl.flock(lf, fcntl.LOCK_EX)
|
fcntl.flock(lf, fcntl.LOCK_EX)
|
||||||
yield
|
yield
|
||||||
finally:
|
finally:
|
||||||
try:
|
try:
|
||||||
if os.name == "nt":
|
if os.name == "nt":
|
||||||
import msvcrt
|
import msvcrt
|
||||||
|
|
||||||
msvcrt.locking(lf.fileno(), msvcrt.LK_UNLCK, 1)
|
msvcrt.locking(lf.fileno(), msvcrt.LK_UNLCK, 1)
|
||||||
else:
|
else:
|
||||||
import fcntl
|
import fcntl
|
||||||
|
|
||||||
fcntl.flock(lf, fcntl.LOCK_UN)
|
fcntl.flock(lf, fcntl.LOCK_UN)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user