diff --git a/.flake8 b/.flake8 deleted file mode 100644 index 1e85f7543085..000000000000 --- a/.flake8 +++ /dev/null @@ -1,9 +0,0 @@ -[flake8] -exclude = venv, tui.py, ansys/api/fluent, ansys/fluent/core/solver/settings.py -per-file-ignores = - ansys/fluent/post/post_object_defns.py # noqa: N801 -select = W191, W291, W293, W391, E115, E117, E122, E124, E125, E225, E231, E301, E303, E501, F401, F403, N801, N802, N803, N804, N805, N806 -count = True -max-complexity = 10 -max-line-length = 79 -statistics = True diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dde966d0917b..ba8da68efb59 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,8 @@ repos: hooks: - id: black args: [ - --line-length, "100", + --line-length, "79", + --force-exclude, ansys/api/fluent/v0/|ansys/fluent/core/meshing/tui.py|ansys/fluent/core/solver/tui.py|ansys/fluent/core/solver/settings.py, ansys, codegen, doc, examples, tests ] @@ -13,21 +14,29 @@ repos: rev: 5.10.1 hooks: - id: isort - exclude: ^src/ansys/templates/pypkg/ args: [ --profile, black, + --skip, ansys/fluent/core/meshing/tui.py, + --skip, ansys/fluent/core/solver/tui.py, + --skip, ansys/fluent/core/solver/settings.py, + --skip-glob, ansys/api/fluent/v0/*, --force-sort-within-sections, - --line-length, "100", + --line-length, "79", --section-default, THIRDPARTY, --filter-files, ansys, codegen, doc, examples, tests ] -- repo: https://gitlab.com/PyCQA/flake8 +- repo: https://github.com/PyCQA/flake8 rev: 4.0.1 hooks: - id: flake8 args: [ + --exclude, ansys/api/fluent/v0/* ansys/fluent/core/meshing/tui.py ansys/fluent/core/solver/tui.py ansys/fluent/core/solver/settings.py, + --select, W191 W291 W293 W391 E115 E117 E122 E124 E125 E225 E231 E301 E303 E501 F401 F403 N801 N802 N803 N804 N805 N806, + --count, + --statistics, + --max-complexity, "10", ansys, codegen, doc, examples, tests ] @@ -35,9 +44,13 @@ repos: rev: v2.1.0 hooks: - id: codespell + args: [ + --skip, "ansys/api/fluent/v0/*,ansys/fluent/core/meshing/tui.py,ansys/fluent/core/solver/tui.py,ansys/fluent/core/solver/settings.py", + ] - repo: https://github.com/pycqa/pydocstyle rev: 6.1.1 hooks: - id: pydocstyle additional_dependencies: [toml] + exclude: ^(tests\/|ansys\/api\/fluent\/v0\/|ansys\/fluent\/core\/meshing\/tui.py|ansys\/fluent\/core\/solver\/tui.py|ansys\/fluent\/core\/solver\/settings.py)