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 error codes that are unimplemented or unsupported by Ruff, including error 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.210.dev0.tar.gz (627.1 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.210.dev0-py3-none-win_amd64.whl (731.7 kB view details)

Uploaded Python 3Windows x86-64

flake8_to_ruff-0.0.210.dev0-py3-none-win32.whl (671.4 kB view details)

Uploaded Python 3Windows x86

flake8_to_ruff-0.0.210.dev0-py3-none-musllinux_1_2_x86_64.whl (857.0 kB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

flake8_to_ruff-0.0.210.dev0-py3-none-musllinux_1_2_i686.whl (813.0 kB view details)

Uploaded Python 3musllinux: musl 1.2+ i686

flake8_to_ruff-0.0.210.dev0-py3-none-musllinux_1_2_armv7l.whl (734.5 kB view details)

Uploaded Python 3musllinux: musl 1.2+ ARMv7l

flake8_to_ruff-0.0.210.dev0-py3-none-musllinux_1_2_aarch64.whl (757.4 kB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

flake8_to_ruff-0.0.210.dev0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (813.3 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

flake8_to_ruff-0.0.210.dev0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (1.0 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ s390x

flake8_to_ruff-0.0.210.dev0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (860.4 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64le

flake8_to_ruff-0.0.210.dev0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (872.0 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64

flake8_to_ruff-0.0.210.dev0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (817.9 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ i686

flake8_to_ruff-0.0.210.dev0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (724.9 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARMv7l

flake8_to_ruff-0.0.210.dev0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (745.9 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

flake8_to_ruff-0.0.210.dev0-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (1.5 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.210.dev0-py3-none-macosx_10_7_x86_64.whl (803.8 kB view details)

Uploaded Python 3macOS 10.7+ x86-64

File details

Details for the file flake8_to_ruff-0.0.210.dev0.tar.gz.

File metadata

  • Download URL: flake8_to_ruff-0.0.210.dev0.tar.gz
  • Upload date:
  • Size: 627.1 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.210.dev0.tar.gz
Algorithm Hash digest
SHA256 c370468332a1d84718ebb08ee55b1c3477b76ba5edbccc5bad8fa0b43862db39
MD5 b45d54902ef61f0c1bdfcd15d18f17af
BLAKE2b-256 e242e156986296c46847a6502945d54ce025ce18b974537de30c94e31c88824b

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.210.dev0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.210.dev0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 a2251b2ed74acffec642149abd43a94a78c402be16da27692dcdcd029057c8ce
MD5 60716e63775921afb05aa22ef640e4ae
BLAKE2b-256 038d80d3e7c33ec80a4baaca34d328d6ef96cb8f2fa520fbe6a9a56d06c8cecf

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.210.dev0-py3-none-win32.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.210.dev0-py3-none-win32.whl
Algorithm Hash digest
SHA256 8855d7b6f99b4937ecb9996ff3c91ddecd19e224138acc5e4cad43635722615a
MD5 775a29eab82fa9bffe4fa1b8ae3d0b5c
BLAKE2b-256 8773eb1ae1881beb6c807def5a037bbc048c3ae7b372859d5f9c4fe0f637c6cf

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.210.dev0-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.210.dev0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2d8fa3887575b6f079fe03cb83e669550653177635c8d40232d1fbf6f65cc7a9
MD5 5ef90a433eba65a8a094949e77442a62
BLAKE2b-256 c9bcf5d8aaee6f7410dcd2e8531936ee8a951e4d8bd10219146ee3ce345d086c

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.210.dev0-py3-none-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.210.dev0-py3-none-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 d9f190d4a4c22136f647d7d8a269a0c11b34f0489f0ce224cb1136acbf47fb17
MD5 e8362ea89dad0e982aa0803a5755b616
BLAKE2b-256 ebc769eb3873d762754290d2103cf7ac12c4b9115bccc79042a5e7fc6654d27c

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.210.dev0-py3-none-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.210.dev0-py3-none-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 a158480ca53f90c282e0afbc249eedeea239b12ce41ffe2fc34732da64cd5f01
MD5 32a733e267f39e3d60b2256026c53fb1
BLAKE2b-256 b0d24d7f0271b0024f5909b840037b19e9f5797137267b5aa93bf61e95bad9a7

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.210.dev0-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.210.dev0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 01986d409ced86387e4316e24a58d8bc2a9b29cfa8f4cb4fa210b84aba47836b
MD5 5eb4eb1cf05ccde492747314968543c5
BLAKE2b-256 edf0e962ee36bb920ad9c0da29f620d5e07b0d4265c3a58c8d44828629ad89ef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.210.dev0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5abb22bd323c9927d4a84aa67a49e2db1d9bab566477adddb324d6dff7e72119
MD5 d16d3e4caab23eb9a02a6502c78b7e1b
BLAKE2b-256 67dae6842086f22955781eb4d34f5f0c1242ff2a84081dfa1b5fc60f7ae2f4ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.210.dev0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 026e2106494481e3e3801d849e53aaf2bd5f34c28ff1f10da006fd85334a017e
MD5 6f4584d3e249ae6e88c8e0eb2e0020bd
BLAKE2b-256 99343e897420680ec4a8379ba46567d2418d5125a12ff063e6c7f50e58743349

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.210.dev0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 574b430ccba9cd960dff63644249e9baf3df46691a6c9095328c4185b39c1d82
MD5 bc6cc76ace713c3813ce8215f157eba1
BLAKE2b-256 6d6884b221ae5640713299426142e3bc27bc6315d9f50844f72cb9f5d138d70f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.210.dev0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 434a0b4ae9b106f7702afefe7777e1b23eff59bde5e506f8d058ccf247fb86b0
MD5 84af2e4a28a056f80e9d7c188a192b04
BLAKE2b-256 e5c66aaf9cf21bb98abb5b2c3fe53ae6291fdef96e9b895c9b26373a92ef4ae5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.210.dev0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 61619363ea098f07882650731c5219adc2eaf3bd39668ad3ab68b34d32c905e9
MD5 112be2034879d77c6a79188beb5eb153
BLAKE2b-256 7a36c02f5b82c5c22e716edfe8de86ec2e42e1fc8bb66c1fe41c7bfd6a405d56

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.210.dev0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 887b4e239186d8eebd2fec2acbef22edfd056343237ed8e89b6c27d88cec91ee
MD5 9ac5e15bed4749ffb5802948c06a5a14
BLAKE2b-256 ccdf4e56c3a190c3ec242f5a400d1fa1c5b0099d11923b1a06f94961467b640a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.210.dev0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5b53d9d79ed6afc40174669d25423d6f4e4b92438ad653311180195d1b236c27
MD5 8dabcfe139b70afad498c5957ee19ad6
BLAKE2b-256 c5323230a468eb857f928b2a743a2cc86e8dc5e69499c03aecf1e3bc5f855b94

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.210.dev0-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.210.dev0-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 db86a275b7beded96b84d2d47a4f4071b820387e67ac390b71f0a9789aff5b4b
MD5 e7e5c76b820b8eb5e130a47a86c96977
BLAKE2b-256 491c2ef0c566a15870877289dde5f0c7c09d624c4e61aea9aed858528eca896c

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.210.dev0-py3-none-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.210.dev0-py3-none-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 dab0a0af169c26178c970c45a845322598cfecf886cdf683fd7d616ae37ec5c5
MD5 a793c1dbd8925ed7dbf0c321ef7e6dd6
BLAKE2b-256 058119da2c8f29969cff54944a383af4964ece144433a3f4b2b2711c7045bebb

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