Skip to content

Commit

Permalink
Merge pull request #553 from team-ocean/fix-precommit
Browse files Browse the repository at this point in the history
bump flake8 and black versions
  • Loading branch information
dionhaefner authored Nov 3, 2023
2 parents d1d6d7e + 33b4be8 commit fd36e3c
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
repos:
- repo: https://github.com/ambv/black
rev: 22.3.0
rev: 23.10.1
hooks:
- id: black
language_version: python3

- repo: https://github.com/PyCQA/flake8
rev: 3.8.3
rev: 6.1.0
hooks:
- id: flake8
args: ['--config=setup.cfg']
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/isoneutral_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def run():

end = perf_counter()

logger.debug(f"Time step took {end-start}s")
logger.debug(f"Time step took {end - start}s")


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/tdma_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def run():

end = perf_counter()

logger.debug(f"Time step took {end-start}s")
logger.debug(f"Time step took {end - start}s")


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ tag_prefix = v
exclude = veros/tools/filelock.py
max-line-length = 120
select = C,E,F,W,B,B950
extend-ignore = E203, E501
extend-ignore = E203,E501,W503
1 change: 0 additions & 1 deletion test/cli_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ def test_veros_run(runner, tmpdir):
object.__setattr__(rs, "__locked__", False)

try:

result = runner.invoke(
veros.cli.veros_run.cli, [os.path.join(setup, f"{setup}.py"), "--backend", rs.backend]
)
Expand Down
2 changes: 1 addition & 1 deletion veros/cli/veros_resubmit.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def unparse(args):

def call_veros(cmd, name, n, runlen):
identifier = f"{name}.{n:0>4}"
prev_id = f"{name}.{n-1:0>4}"
prev_id = f"{name}.{n - 1:0>4}"
args = [
"-s",
"identifier",
Expand Down
2 changes: 1 addition & 1 deletion veros/tools/filelock.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def __str__(self):
# Classes
# ------------------------------------------------


# This is a helper class which is returned by :meth:`BaseFileLock.acquire`
# and wraps the lock to make sure __enter__ is not called twice when entering
# the with statement.
Expand Down Expand Up @@ -294,7 +295,6 @@ def release(self, force=False):
every case.
"""
with self._thread_lock:

if self.is_locked:
self._lock_counter -= 1

Expand Down

0 comments on commit fd36e3c

Please sign in to comment.