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.125_dev.0.tar.gz (302.6 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.125_dev.0-py3-none-win_amd64.whl (630.7 kB view details)

Uploaded Python 3Windows x86-64

flake8_to_ruff-0.0.125_dev.0-py3-none-win32.whl (573.9 kB view details)

Uploaded Python 3Windows x86

flake8_to_ruff-0.0.125_dev.0-py3-none-musllinux_1_2_x86_64.whl (757.3 kB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

flake8_to_ruff-0.0.125_dev.0-py3-none-musllinux_1_2_i686.whl (717.3 kB view details)

Uploaded Python 3musllinux: musl 1.2+ i686

flake8_to_ruff-0.0.125_dev.0-py3-none-musllinux_1_2_armv7l.whl (640.0 kB view details)

Uploaded Python 3musllinux: musl 1.2+ ARMv7l

flake8_to_ruff-0.0.125_dev.0-py3-none-musllinux_1_2_aarch64.whl (666.1 kB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

flake8_to_ruff-0.0.125_dev.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (714.5 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

flake8_to_ruff-0.0.125_dev.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (833.1 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ s390x

flake8_to_ruff-0.0.125_dev.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (743.0 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64le

flake8_to_ruff-0.0.125_dev.0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (756.5 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64

flake8_to_ruff-0.0.125_dev.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (629.8 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARMv7l

flake8_to_ruff-0.0.125_dev.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (654.1 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

flake8_to_ruff-0.0.125_dev.0-py3-none-manylinux_2_5_i686.manylinux1_i686.whl (714.0 kB view details)

Uploaded Python 3manylinux: glibc 2.5+ i686

flake8_to_ruff-0.0.125_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.125_dev.0-py3-none-macosx_10_7_x86_64.whl (685.5 kB view details)

Uploaded Python 3macOS 10.7+ x86-64

File details

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

File metadata

  • Download URL: flake8_to_ruff-0.0.125_dev.0.tar.gz
  • Upload date:
  • Size: 302.6 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.125_dev.0.tar.gz
Algorithm Hash digest
SHA256 f9dd75a6c543f89571ba5d25c7cd8e059680960e596c3291875ed713a0768ac3
MD5 e645813899666fa9540c6243ecf40763
BLAKE2b-256 0b030c721dba5a12abfec367737d5abf9051be7fa23f466cdc6ba67fb7e8fbd8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.125_dev.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 6eafbff8a05ea391fb1c012f8f4a8e758b7eb016d6ad7df7452a25d57e58e300
MD5 396bf7dd16899a4af64d0969acd55175
BLAKE2b-256 a1a61c1d9367103dab81453becd4f5afcf7cbba7aaf966642fdf1dad5a157d36

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.125_dev.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 46847312d3f683d03110dc975819a14bf6cd4e29d645c62d76225aa2b614ae13
MD5 12778a4134e686b0aa5b0e1c248bcc02
BLAKE2b-256 fff03bc8cc2ad4acdcae3e9f41117318eb481642517e818689cb535180387a3f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.125_dev.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 14c17697868e8ab207013ca8c05d1a07f774ae4ba5f89dd711b666a10c0101fd
MD5 6d26b473b6063208ecd1309cd06a4af8
BLAKE2b-256 d17e49d8839ec2d86bb4b62253a21ba495dfae7cfac89521ebf83c9217795aa8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.125_dev.0-py3-none-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 83ac486cbb40b1fce9835c4f43585b683be3c20c5235a0f71adea404b42dda5a
MD5 d56c4b919046e8d4aa24dfe54d956b52
BLAKE2b-256 4025eb82219d8cec3cca09b4eba0eb518260ee02e22daab5734828a3d95cd31a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.125_dev.0-py3-none-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 757680ec7216b3e0405ad736ca3fbbc1e184f0bbe043239d69af4f3abe293a54
MD5 a99e16a0ea60c8da729df47f852162e3
BLAKE2b-256 f567bdd860896a569965bac6af55974d973e562862a43cf4dfd877baa0b5b18a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.125_dev.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 171583ae35fb075f80e282de54b6b28bc1871d59ef1b01f2ea0eca067c594ff5
MD5 60bd559c9858e63e84367fdfc097dd2b
BLAKE2b-256 34c65ea10937c846c511bb3b2e05948c29107534d85bdd96c3b295d02f312be1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.125_dev.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 eb256a5a5af30f7ff86efd5ce2f27e6c1e45deb5ee5fe2332ff0b6172391eced
MD5 f239099214e64338b06af32e73bb22c8
BLAKE2b-256 00671a578f84835a5f360511a5338425c6d4b3367cc48e5205156c0188000ffa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.125_dev.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 2d1a9db1226d6cc8b28e9c8d83ab58bfb16d77d40741768aa6d38d7b721ffd58
MD5 5c245dadc7473255e785268141cb33a6
BLAKE2b-256 1b9ef7ccd5b0fc1b031aa6b45386c6974862400f8bdd5b1dd26a46042a427019

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.125_dev.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 46dcebfd287ac9aee2f9f1fe0919a6b716b66977a512f4645b8e2665bad6903d
MD5 f5ebe50fc00a0e2dac9fa78d67cc4aa3
BLAKE2b-256 0cad0191493fa535244806827240aaaa0e7b6337562da208e37682bafa7642c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.125_dev.0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 2b37cd7b330d3125ea63a0ba4fc4f6bab9c694307831f34fc0fb7000a25fc96f
MD5 8776d1b96713fa9f208452fcfe06ac99
BLAKE2b-256 81c0f5af0392700eda26f628b6e9d16dd6f12d1db2500b424d1a0ceeffb89a59

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.125_dev.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 6a71cc1b5b2e023f66c63877ff558dce45f35c9db636bb126a67b2836701e967
MD5 b42f9f02405c4a72808fdb09041f7a0b
BLAKE2b-256 aab6d3c68df036c85a13a9ed271f11b0fe725c7e9485d1647e061d0c97da728d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.125_dev.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 51a22315c8ae39874cccc3b997888cf18c2a5af724dff58dc3af2da64b949f45
MD5 9d2e4101b5604968c7007d6877f05620
BLAKE2b-256 0d62b4bdc3c4bb009aaa594e3fb64ed9076eadd70be5befbd376fb5b1911d1c0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.125_dev.0-py3-none-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 4780a352c82a8c320b040e60a739023fd7ab7404f815ee266a85f0570967bbaa
MD5 46d3b907923d81b1495943cc69b41882
BLAKE2b-256 255b5c3f83f1b5f0cb4a0494e73604c762f48eff88f7cb484bf2cb200ded2250

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.125_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.125_dev.0-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 966b283996310c513ac1f6967d7bef369923a2c76b659521d535f4516e6240e7
MD5 79684238c2c50738ce3639294580aaec
BLAKE2b-256 ff9f0958ab47a917c9d33d9334c4475c8478625822ec9d5f37853c7b3589814a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.125_dev.0-py3-none-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 0e33b10dfd273b51745b42d6f0131b31d3a2a752feb7ae11573b298eb7becab4
MD5 3d4368d1f6ba839050703ba06bba02f5
BLAKE2b-256 72cd292f9f93d2b187fca2bd949e96212f6985ca6f6865ff9e864cac60cd7122

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