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.99_dev.0.tar.gz (232.4 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.99_dev.0-py3-none-win_amd64.whl (621.0 kB view details)

Uploaded Python 3Windows x86-64

flake8_to_ruff-0.0.99_dev.0-py3-none-win32.whl (573.2 kB view details)

Uploaded Python 3Windows x86

flake8_to_ruff-0.0.99_dev.0-py3-none-musllinux_1_2_x86_64.whl (748.1 kB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

flake8_to_ruff-0.0.99_dev.0-py3-none-musllinux_1_2_i686.whl (707.6 kB view details)

Uploaded Python 3musllinux: musl 1.2+ i686

flake8_to_ruff-0.0.99_dev.0-py3-none-musllinux_1_2_armv7l.whl (629.5 kB view details)

Uploaded Python 3musllinux: musl 1.2+ ARMv7l

flake8_to_ruff-0.0.99_dev.0-py3-none-musllinux_1_2_aarch64.whl (655.7 kB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

flake8_to_ruff-0.0.99_dev.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (705.4 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

flake8_to_ruff-0.0.99_dev.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (818.9 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ s390x

flake8_to_ruff-0.0.99_dev.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (730.8 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64le

flake8_to_ruff-0.0.99_dev.0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (740.1 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64

flake8_to_ruff-0.0.99_dev.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (618.9 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARMv7l

flake8_to_ruff-0.0.99_dev.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (643.4 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

flake8_to_ruff-0.0.99_dev.0-py3-none-manylinux_2_5_i686.manylinux1_i686.whl (704.6 kB view details)

Uploaded Python 3manylinux: glibc 2.5+ i686

flake8_to_ruff-0.0.99_dev.0-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (1.3 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.99_dev.0-py3-none-macosx_10_7_x86_64.whl (668.6 kB view details)

Uploaded Python 3macOS 10.7+ x86-64

File details

Details for the file flake8_to_ruff-0.0.99_dev.0.tar.gz.

File metadata

  • Download URL: flake8_to_ruff-0.0.99_dev.0.tar.gz
  • Upload date:
  • Size: 232.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for flake8_to_ruff-0.0.99_dev.0.tar.gz
Algorithm Hash digest
SHA256 b19993fd160c067ca23faf2c9e48e3caef12bce3b6d0f35ee7f3b5845550dee1
MD5 bcf96d081c676c11163ed5d82522db8b
BLAKE2b-256 b66b02936902d5e405b9c95338e81d5995dda0300cd3318523c4356e5e13a85f

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.99_dev.0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.99_dev.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 79bd8eb2aaeff3ef3292aa0f98f8227ef321bec1cf7b96cb5ed1319716369d76
MD5 4cb639c29b6ac950b70877cf76e91680
BLAKE2b-256 20272a3ff67539a5c58df7c2f1f342fff95bb2a1979c0c29ef5d6d7ad91205f4

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.99_dev.0-py3-none-win32.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.99_dev.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 44c7ee4e9d65f92120192208b03857a519cd47659ce42edcf9393190a1d160b1
MD5 6ff63cbcf29bedca0c5b311c23f5ea41
BLAKE2b-256 cd8b9c659d748a435130d717788e002bc71c3169935bf6698886226f82b3d255

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.99_dev.0-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.99_dev.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c722e8a564d8afc73806067830083d326874a605d36b5d8f702a62d8a7344b68
MD5 8cb6474ad9765328db9b46ef285869ee
BLAKE2b-256 d38a1d4a685bc9b3d9a054ba34d575b1abf1989f300effb9a75371a5c449f8e4

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.99_dev.0-py3-none-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.99_dev.0-py3-none-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 5c686d59dc604b31c09a954d47f2e13e0ba6e90f452795f6495766794f4aba84
MD5 3c83dae4bf5b243e512fe4a7c18b80e7
BLAKE2b-256 bda1014437bf715492d17e45bacd9e81771250bf119f0c058c1f5f3bacd3f902

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.99_dev.0-py3-none-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.99_dev.0-py3-none-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 57d73015e1fb687ee4f2629402353ab96f4646a84dfe3ba53e0c2d21d067cf4e
MD5 f7bcd435beaa2e3bd4765878442b3351
BLAKE2b-256 4dc36ad19a57ea143c37455207a10ebd2f35ff1ebd7bdbe06478dffe25901426

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.99_dev.0-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.99_dev.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 53d05ef8181643070e92d431a876e680c182e1ac3df1426922628f6627258f64
MD5 3b056ddd4a25fb07c307faa52bdb81df
BLAKE2b-256 24c2dd71b8ffa60d61458144eaac02ad1ac2f8e16b7e4b3b456a3163a456ef41

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.99_dev.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.99_dev.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 138123d17c1335dfd0bfc7170628f0d2db2a3c0fd460a14486c27cfff3ebe8bd
MD5 345c7cc8293e3d88e1355bb63e47345c
BLAKE2b-256 ca942b6c720b4300d68eb40f3a0bd3e18e5be7eebb110c1ebde1c817e79a8964

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.99_dev.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.99_dev.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 6458b278531e9d6418aff495d6954155108a0dbf878a19a38ecc6b7715536c95
MD5 2050d86b1c02fc70048a5faf34e3f04e
BLAKE2b-256 8648657154f9b3e1cea298dece0ce9c9d2e8a67559691992b235c19a0a6639fc

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.99_dev.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.99_dev.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 a73c0d589401be786b49287c78cc63a6d2bab4868936d5bbb726e8781e2c71d8
MD5 0540835dd3ce1ed3478e4662011de974
BLAKE2b-256 0ae6e242c0f9e6a8524aac3e57a48367d844df953b6fbb9745578c1783a7cc37

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.99_dev.0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.99_dev.0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 7f55149f25b5827d919d7e787d806f7464620fdb351e45482522c0cf0c6ead6f
MD5 dfdb1624516b9430820f4ae2758ff49c
BLAKE2b-256 097e7da125047f9159ccd6b3f259e3f501e130205fb8597ff4d766f66b2e1949

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.99_dev.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.99_dev.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 35e9a6ffa272b8144a45508237fd0e8864c58dac5a55fbb30f3ea0a15b45b795
MD5 3b47d0835fb2442d8de33590ea5e7aec
BLAKE2b-256 a8780b093f45b6d7f17dc60feb7fea80cce70310cd617739cef6a4e54083d7c5

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.99_dev.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.99_dev.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1ac3368c62bc3734d791b665169078e7e5f7ea32f0d5ce5dfa13c479d2c7325a
MD5 589fa7736048bd87e2985e92c7ae299b
BLAKE2b-256 31820379a9627f1fd1d7f40670ee9a9607f338e0c0317ffe5ef2a4d356dea152

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.99_dev.0-py3-none-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.99_dev.0-py3-none-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 17cd5b92494906cf30dd063641c300b1099a8a0cdb12f9eaa75ce47f25d2ab89
MD5 4da46b7faa898c07629d35677ff7fb38
BLAKE2b-256 bf1dfe51cac1cf9eb2fbf61a2497b73378fa78c215c1aeb955e55178a2eff6bb

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.99_dev.0-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.99_dev.0-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c6a8683464ad6d8b3d21d4c0d71cb2287b67bdbbef5d913b2d9ebf9e46c216d5
MD5 23bd3adecbb541762646342c65b386ca
BLAKE2b-256 40aa367d6f9ac89b78489df24f179aae1a2836953c3bfff9b075abdaa628eada

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.99_dev.0-py3-none-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.99_dev.0-py3-none-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 e926f1eabaf26a094ef598f061c1be546b7dbc4ca57e4657d9927146c19e134e
MD5 849a94e0e6ec15634649ee97eb5c0482
BLAKE2b-256 288572deb271de28d365aaabc310237fbd10fa1e57f5a152de9bac20326cdbcf

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