diff --git a/.flake8 b/.flake8 deleted file mode 100644 index 764d78acb9..0000000000 --- a/.flake8 +++ /dev/null @@ -1,14 +0,0 @@ -[flake8] -max-line-length = 88 -ignore = D100,D101,D102,D103,D104,D105,D200,D201,D202,D204,D205,D208,D209,D210,D300,D301,D400,D401,D403,E24,E121,E123,E126,E226,E266,E402,E704,E731,F821,I100,I101,I201,N802,N803,N804,N806,W503,W504,W605, E203 -exclude = - .git - __pycache__ - build - dist - fury/_version.py - docs/source/conf.py - docs/experimental - *test* - *sphinx* - */__init__.py diff --git a/.pep8speaks.yml b/.pep8speaks.yml deleted file mode 100644 index 556c015233..0000000000 --- a/.pep8speaks.yml +++ /dev/null @@ -1,12 +0,0 @@ -scanner: - diff_only: True # Only show errors caused by the patch - linter: flake8 - -message: # Customize the comment made by the bot - opened: # Messages when a new PR is submitted - header: "Hello @{name}, thank you for submitting the Pull Request!" - footer: "To test for issues locally, `pip install flake8` and then run `flake8 fury`." - updated: # Messages when new commits are added to the PR - header: "Hello @{name}, Thank you for updating!" - footer: "To test for issues locally, `pip install flake8` and then run `flake8 fury`." - no_errors: "Cheers! There are no style issues detected in this Pull Request. :beers: " diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dec382b2e1..ceea67ab29 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,15 +16,6 @@ repos: - id: detect-aws-credentials args: [--allow-missing-credentials] - id: detect-private-key - # - repo: https://github.com/grantjenks/blue - # rev: v0.9.1 - # hooks: - # - id: blue - - repo: https://github.com/pycqa/flake8 - rev: 6.0.0 - hooks: - - id: flake8 - exclude: "^(docs/experimental|tools)/" - repo: https://github.com/codespell-project/codespell rev: v2.2.2 hooks: @@ -52,3 +43,5 @@ repos: # Run the linter - id: ruff args: [ --fix ] + # Run the formatter + - id: ruff-format diff --git a/pyproject.toml b/pyproject.toml index 9395a0b50c..09ded7602b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,7 +74,7 @@ doc = [ "texext", "tomli; python_version < \"3.11\"", ] -style = ["flake8", "blue", "ruff", "pre-commit"] +style = ["ruff", "pre-commit"] typing = ["mypy", "types-Pillow", "data-science-types"] test = [ "coverage", @@ -97,19 +97,38 @@ raw-options = { version_scheme = "release-branch-semver" } [tool.hatch.build.hooks.vcs] version-file = "fury/_version.py" -[tool.blue] +[tool.ruff] line_length = 88 target-version = ["py38"] -force-exclude = """ -( - _version.py - *docs/experimental/* -) -""" - -[flake8] -max-line-length = 88 -extend-exclude = ["_version.py", "externals", "*docs/experimental*"] +exclude = [ + ".git", + "__pycache__", + "build", + "dist", + "_version.py", +] + +[tool.ruff.lint] +select = [ + "F", + "E", + "C", + "W", + "B", + "I", +] +ignore = [ + "E203" +] + +[tool.ruff.lint.flake8-quotes] +inline-quotes = "double" + +[tool.ruff.format] +quote-style = "double" + +[tool.ruff.lint.isort] +known-first-party=["fury"] [tool.mypy] python_version = "3.11"