style: ruff format mempalace/palace.py

Add blank lines after inline imports in mine_lock. Pure formatting.
This commit is contained in:
Igor Lins e Silva
2026-04-13 15:54:52 -03:00
parent 09f218cbb2
commit 386da51ae5
+4
View File
@@ -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