Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nsheff committed Feb 1, 2024
1 parent 36dca03 commit 708db66
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions locking_tests/locking_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@
from yacman import write_lock

import logging

_LOGGER = logging.getLogger() # root logger
stream = logging.StreamHandler(sys.stdout)
fmt = logging.Formatter("%(levelname)s %(asctime)s | %(name)s:%(module)s:%(lineno)d > %(message)s ")
fmt = logging.Formatter(
"%(levelname)s %(asctime)s | %(name)s:%(module)s:%(lineno)d > %(message)s "
)
stream.setFormatter(fmt)
_LOGGER.setLevel(os.environ.get("LOGLEVEL", "DEBUG"))
_LOGGER.addHandler(stream)
Expand All @@ -31,7 +34,9 @@
with write_lock(ym) as locked_y:
locked_y.rebase()
random_wait_time = random()
_LOGGER.debug(f"Sleeping for {random_wait_time} to simulate process {args.id} updating the file")
_LOGGER.debug(
f"Sleeping for {random_wait_time} to simulate process {args.id} updating the file"
)
sleep(random_wait_time)
locked_y.update({args.id: 1})
_LOGGER.debug(f"Writing to file for process {args.id}.")
Expand Down

0 comments on commit 708db66

Please sign in to comment.