diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 441dbe5c7..5ed1a0699 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,27 +33,27 @@ repos: - id: mixed-line-ending - repo: https://github.com/pycqa/isort - rev: 6.1.0 + rev: 7.0.0 hooks: - id: isort name: isort (python) args: ["--line-length=120", "--profile=black"] - repo: https://github.com/pycqa/isort - rev: 6.1.0 + rev: 7.0.0 hooks: - id: isort name: isort (python) (check) args: ["--line-length=120", "--profile=black", "--check"] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 25.9.0 + rev: 25.12.0 hooks: - id: black args: ["--line-length=120"] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 25.9.0 + rev: 25.12.0 hooks: - id: black name: black (check) @@ -66,14 +66,14 @@ repos: args: ["--count", "--statistics", "--config=setup.cfg"] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.18.2 + rev: v1.19.1 hooks: - id: mypy exclude: (^tests/|^plugins/) additional_dependencies: [types-PyYAML,types-filelock,types-requests,types-docutils,types-cachetools] - repo: https://github.com/asottile/pyupgrade - rev: v3.20.0 + rev: v3.21.2 hooks: - id: pyupgrade args: [--py37-plus] diff --git a/monailabel/_version.py b/monailabel/_version.py index 551342ce7..0e55b9813 100644 --- a/monailabel/_version.py +++ b/monailabel/_version.py @@ -97,8 +97,7 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, env= print(f"unable to find command, tried {commands}") return None, None stdout = p.communicate()[0].strip() - if sys.version_info[0] >= 3: - stdout = stdout.decode() + stdout = stdout.decode() if p.returncode != 0: if verbose: print("unable to run %s (error)" % dispcmd)