diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7be1c11..b4ca94d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,10 +1,10 @@ -default_stages: [commit] +default_stages: [pre-commit] default_language_version: python: python3.10 repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v5.0.0 hooks: - id: check-added-large-files args: ['--maxkb=512'] @@ -15,13 +15,13 @@ repos: - id: requirements-txt-fixer - repo: https://github.com/codespell-project/codespell - rev: v2.2.5 + rev: v2.3.0 hooks: - id: codespell exclude: main.spec - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort args: [ @@ -32,7 +32,7 @@ repos: name: isort (python) - repo: https://github.com/PyCQA/autoflake - rev: v2.2.0 + rev: v2.3.1 hooks: - id: autoflake name: autoflake @@ -48,14 +48,14 @@ repos: ] - repo: https://github.com/asottile/add-trailing-comma - rev: v2.5.1 + rev: v3.1.0 hooks: - id: add-trailing-comma args: - --py36-plus - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 24.10.0 hooks: - id: black args: [ diff --git a/test/TestMethods.py b/test/TestMethods.py index 66c91de..ea24437 100644 --- a/test/TestMethods.py +++ b/test/TestMethods.py @@ -102,16 +102,18 @@ def abstract_program_test(self, path, test_scopes=False): interpreter.interpret() self.assertEqual( - interpreter.GLOBAL_SCOPE - if not test_scopes - else [ - [ - scope.scope_name, - scope.scope_level, - scope.enclosing_scope.scope_name if scope.enclosing_scope else None, + ( + interpreter.GLOBAL_SCOPE + if not test_scopes + else [ + [ + scope.scope_name, + scope.scope_level, + scope.enclosing_scope.scope_name if scope.enclosing_scope else None, + ] + for scope in interpreter.semantic_analyzer.scopes ] - for scope in interpreter.semantic_analyzer.scopes - ], + ), global_scope, ) self.delete(path)