Skip to main content

Convert existing Flake8 configuration to Ruff.

Project description

flake8-to-ruff

Convert existing Flake8 configuration files (setup.cfg, tox.ini, or .flake8) for use with Ruff.

Generates a Ruff-compatible pyproject.toml section.

Installation and Usage

Installation

Available as flake8-to-ruff on PyPI:

pip install flake8-to-ruff

Usage

To run flake8-to-ruff:

flake8-to-ruff path/to/setup.cfg
flake8-to-ruff path/to/tox.ini
flake8-to-ruff path/to/.flake8

flake8-to-ruff will print the relevant pyproject.toml sections to standard output, like so:

[tool.ruff]
exclude = [
    '.svn',
    'CVS',
    '.bzr',
    '.hg',
    '.git',
    '__pycache__',
    '.tox',
    '.idea',
    '.mypy_cache',
    '.venv',
    'node_modules',
    '_state_machine.py',
    'test_fstring.py',
    'bad_coding2.py',
    'badsyntax_*.py',
]
select = [
    'A',
    'E',
    'F',
    'Q',
]
ignore = []

[tool.ruff.flake8-quotes]
inline-quotes = 'single'

[tool.ruff.pep8-naming]
ignore-names = [
    'foo',
    'bar',
]

Plugins

flake8-to-ruff will attempt to infer any activated plugins based on the settings provided in your configuration file.

For example, if your .flake8 file includes a docstring-convention property, flake8-to-ruff will enable the appropriate flake8-docstrings checks.

Alternatively, you can manually specify plugins on the command-line:

flake8-to-ruff path/to/.flake8 --plugin flake8-builtins --plugin flake8-quotes

Limitations

  1. Ruff only supports a subset of the Flake configuration options. flake8-to-ruff will warn on and ignore unsupported options in the .flake8 file (or equivalent). (Similarly, Ruff has a few configuration options that don't exist in Flake8.)
  2. Ruff will omit any rule codes that are unimplemented or unsupported by Ruff, including rule codes from unsupported plugins. (See the Ruff README for the complete list of supported plugins.)

License

MIT

Contributing

Contributions are welcome and hugely appreciated. To get started, check out the contributing guidelines.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flake8_to_ruff-0.0.233.tar.gz (730.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

flake8_to_ruff-0.0.233-py3-none-win_amd64.whl (803.4 kB view details)

Uploaded Python 3Windows x86-64

flake8_to_ruff-0.0.233-py3-none-win32.whl (742.0 kB view details)

Uploaded Python 3Windows x86

flake8_to_ruff-0.0.233-py3-none-musllinux_1_2_x86_64.whl (930.0 kB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

flake8_to_ruff-0.0.233-py3-none-musllinux_1_2_i686.whl (887.1 kB view details)

Uploaded Python 3musllinux: musl 1.2+ i686

flake8_to_ruff-0.0.233-py3-none-musllinux_1_2_armv7l.whl (806.0 kB view details)

Uploaded Python 3musllinux: musl 1.2+ ARMv7l

flake8_to_ruff-0.0.233-py3-none-musllinux_1_2_aarch64.whl (822.1 kB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

flake8_to_ruff-0.0.233-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (887.9 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

flake8_to_ruff-0.0.233-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (1.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ s390x

flake8_to_ruff-0.0.233-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (933.0 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64le

flake8_to_ruff-0.0.233-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (938.0 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64

flake8_to_ruff-0.0.233-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (896.1 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ i686

flake8_to_ruff-0.0.233-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (795.0 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARMv7l

flake8_to_ruff-0.0.233-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (810.9 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

flake8_to_ruff-0.0.233-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (1.7 MB view details)

Uploaded Python 3macOS 10.9+ universal2 (ARM64, x86-64)macOS 10.9+ x86-64macOS 11.0+ ARM64

flake8_to_ruff-0.0.233-py3-none-macosx_10_7_x86_64.whl (878.4 kB view details)

Uploaded Python 3macOS 10.7+ x86-64

File details

Details for the file flake8_to_ruff-0.0.233.tar.gz.

File metadata

  • Download URL: flake8_to_ruff-0.0.233.tar.gz
  • Upload date:
  • Size: 730.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for flake8_to_ruff-0.0.233.tar.gz
Algorithm Hash digest
SHA256 ee519743260fa6d263415a5c5db90c44c3958fdc42069a5b249e7648c5ac3ac8
MD5 2f3bc8330d0dd306556f8e2ea0846aeb
BLAKE2b-256 2218861a7b92f6141e8476c6fc7aa4aa21d1c09b1eff0cfd8fd843cb721e3b2e

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.233-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.233-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 2e0644d0e5bc1d1e342f0a8f02b0e6bc8d12cb281be56db167c39e5c9ea25ef0
MD5 8e430229e55680a86f4e359d15d06b84
BLAKE2b-256 e013e8962e41addc3a659e438cfa75b6fd1aacc0a6c2d4ab9ff9d575edc27475

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.233-py3-none-win32.whl.

File metadata

  • Download URL: flake8_to_ruff-0.0.233-py3-none-win32.whl
  • Upload date:
  • Size: 742.0 kB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for flake8_to_ruff-0.0.233-py3-none-win32.whl
Algorithm Hash digest
SHA256 f0409ee356cad32614be34f08ea18a36acbadf955d8380b0c036ce0d4d5bdda9
MD5 b335c7ecf41d34338c7f4cf343d71f55
BLAKE2b-256 4706ed95f0d6e025e50bfb59d5211eb6e7f46d6444ae206ada46e385977b8c14

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.233-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.233-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f7f3e13e69eeeaf65f0a93f9f6416437b038e31d8d2a3f5a2acb24b467cd9375
MD5 eeaf5970399b667843e463b9def1ee9e
BLAKE2b-256 56442c162ad53d0518ef14ba6d950f76b5cda772b86079879e6fbd82c2fd13a4

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.233-py3-none-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.233-py3-none-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 9eae5d614929b3f13da243957c701da9e38f233f3e45bd4fda4b195a2a79aa84
MD5 8e28d82a03b17b0d6ba561e1608346da
BLAKE2b-256 1f2bf417dcba9ccf5f96669b3cd5545b2fd40bd05eb20e2b82dd4ba3c36e76cd

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.233-py3-none-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.233-py3-none-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 ac6fead9f95e1d65385e04d85d6819c212d6ae71dd8248c6b5f530dcaaef3972
MD5 7b190e2f30bd1b5ada274f82787b9f2e
BLAKE2b-256 18c99df0416a99329118c73a7b593df401a165b2b35dc8ef36671cfef691a911

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.233-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.233-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 20df2472ce1004f3e2532f9e51adc72441ea76a03dd4dce5ac7aed3ff54f400e
MD5 10b58b18cc6da63c5d82a996a9e3b8a5
BLAKE2b-256 0ebed8a5abfd5e27d2b569aaeae8a401b8850895503ee48978adbb635bd7954b

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.233-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.233-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d1460505be66d14b9fa4c3670a7e03b9ef02f5e12176d17926ec490cbeff2a5b
MD5 89b4dd31080ebc568f13e68a19980bce
BLAKE2b-256 c5347a593a0fe434c0ed1321bd73ba2c10199c7c30e8891998d3d522c517f4aa

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.233-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.233-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 c84e2448c41331a76e81fd5c44046d445876e6a34e806aa1e577c08236e96066
MD5 d09d4fb34af4c4d256fe322d842ab1dd
BLAKE2b-256 3debb52b473c0a8b1492d32344029c10e025781a598beb66fefa547fa3ec7a84

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.233-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.233-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 07590a228df94bb53b9af95ae87e9291baff6fa42622e17effb62ce3e15b76d9
MD5 d80aeebed912ec82ec4c796242145ba3
BLAKE2b-256 209968fd8b87b5c2493c29cec0181a440732470eafe89acfb68c4f447daf6dba

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.233-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.233-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 d79aea40780505db0e5f1033c93e0ae93eb364992a0ee43f2c67f0fbcff7e178
MD5 56e181f6a0cb08ac4dbe0e7503352693
BLAKE2b-256 e38e64f086976062b17c8632a2e5c1de32847308b8389653910254d2330ee18f

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.233-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.233-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 4f478e5e59d5b5237b2204f8ffe8e72adb9ae5b7710de9fb0f671153a4ea70f9
MD5 2bb6b20328ded30cbf13a080d6f4cfc4
BLAKE2b-256 cb44d4e6c87849fb9238e497f9da4a9efe657fdd762875633feb8e3651ef85fb

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.233-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.233-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 3eb93f394a2169af86e490c3c048646ceba93236d9c9cc82945a928b68bad418
MD5 1e55e2971817477f36ff618dd1cf3dc1
BLAKE2b-256 ecf761aab0444afe43c05dc1cdaf9b28d614141b227c84759d76583e7cf8297c

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.233-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.233-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b797da16741e14ae5c67f04c0fd9e1edee17dcd9e4af8cdb329c792983df04ef
MD5 91f65393a2d02ee54da029416a5e5ef8
BLAKE2b-256 60edaf2f18c6832ff426e929ca8aa8a86269af310251136a6b7c44bd7ab1495c

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.233-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.233-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a3df36fb8d645334786b3f883e17af9f939872ecb1a8dcde5f6d42ab3b65e3f4
MD5 6d126ea15a2d1bf8c291e954f2d05943
BLAKE2b-256 6f202e41cbd7db11fe6f9c7e14c8244ddf673ba77956308c4c638a22798e62e3

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.233-py3-none-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.233-py3-none-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 1a10416582c522def5e07485e46265e1b9e4d97b8172494c1f84d031ca3c44c7
MD5 40515790c49cb9c2144939c859069bdf
BLAKE2b-256 a18d32abe44b83d5ade4dfc7443cc670a6b378c2179500f4cb7167283427e674

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page