From b853bb3bae69657763dc57ef13c01cbb19c55383 Mon Sep 17 00:00:00 2001 From: francisco souza <108725+fsouza@users.noreply.github.com> Date: Thu, 13 Oct 2022 09:43:59 -0400 Subject: [PATCH] Use ruff instead of flake8 --- .flake8 | 3 --- .pre-commit-config.yaml | 6 +++--- pyproject.toml | 29 +++++++++++------------------ 3 files changed, 14 insertions(+), 24 deletions(-) delete mode 100644 .flake8 diff --git a/.flake8 b/.flake8 deleted file mode 100644 index 0174b89..0000000 --- a/.flake8 +++ /dev/null @@ -1,3 +0,0 @@ -[flake8] -ignore = E203,W503 -max-line-length = 88 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6b01c4d..32f6c91 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,10 +18,10 @@ repos: args: - --py37-plus - - repo: https://github.com/pycqa/flake8 - rev: "5.0.4" + - repo: https://github.com/charliermarsh/ruff-pre-commit + rev: v0.0.69 hooks: - - id: flake8 + - id: lint - repo: https://github.com/asottile/pyupgrade rev: v3.1.0 diff --git a/pyproject.toml b/pyproject.toml index fbc9da8..b87e474 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,22 +5,19 @@ build-backend = "setuptools.build_meta" [project] name = "autoflake" description = "Removes unused imports and unused variables" -license = {text = "MIT"} +license = { text = "MIT" } classifiers = [ - "Environment :: Console", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Topic :: Software Development :: Quality Assurance", + "Environment :: Console", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Software Development :: Quality Assurance", ] keywords = ["clean", "fix", "automatic", "unused", "import"] -urls = {Homepage = "https://www.github.com/PyCQA/autoflake"} +urls = { Homepage = "https://www.github.com/PyCQA/autoflake" } requires-python = ">=3.7" -dependencies = [ - "pyflakes>=1.1.0", - "tomli>=2.0.1;python_version<'3.11'", -] +dependencies = ["pyflakes>=1.1.0", "tomli>=2.0.1;python_version<'3.11'"] dynamic = ["version"] [project.readme] @@ -36,14 +33,10 @@ license-files = ["LICENSE"] include-package-data = false [tool.setuptools.packages] -find = {namespaces = false} +find = { namespaces = false } [tool.setuptools.dynamic] -version = {attr = "autoflake.__version__"} +version = { attr = "autoflake.__version__" } [tool.distutils.bdist_wheel] universal = 1 - -[tool.flake8] -ignore = "E203,W503" -max-line-length = "88"