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.216.dev0.tar.gz (650.8 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.216.dev0-py3-none-win_amd64.whl (779.0 kB view details)

Uploaded Python 3Windows x86-64

flake8_to_ruff-0.0.216.dev0-py3-none-win32.whl (709.9 kB view details)

Uploaded Python 3Windows x86

flake8_to_ruff-0.0.216.dev0-py3-none-musllinux_1_2_x86_64.whl (903.4 kB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

flake8_to_ruff-0.0.216.dev0-py3-none-musllinux_1_2_i686.whl (857.1 kB view details)

Uploaded Python 3musllinux: musl 1.2+ i686

flake8_to_ruff-0.0.216.dev0-py3-none-musllinux_1_2_armv7l.whl (779.2 kB view details)

Uploaded Python 3musllinux: musl 1.2+ ARMv7l

flake8_to_ruff-0.0.216.dev0-py3-none-musllinux_1_2_aarch64.whl (798.6 kB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

flake8_to_ruff-0.0.216.dev0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (860.5 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

flake8_to_ruff-0.0.216.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.216.dev0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (905.2 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64le

flake8_to_ruff-0.0.216.dev0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (911.5 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64

flake8_to_ruff-0.0.216.dev0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (864.7 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ i686

flake8_to_ruff-0.0.216.dev0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (769.6 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARMv7l

flake8_to_ruff-0.0.216.dev0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (787.2 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

flake8_to_ruff-0.0.216.dev0-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (1.6 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.216.dev0-py3-none-macosx_10_7_x86_64.whl (851.6 kB view details)

Uploaded Python 3macOS 10.7+ x86-64

File details

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

File metadata

  • Download URL: flake8_to_ruff-0.0.216.dev0.tar.gz
  • Upload date:
  • Size: 650.8 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.216.dev0.tar.gz
Algorithm Hash digest
SHA256 acddfd86b542167948d56865833dd1ab3674d2831fee598bea9d1f05a7d993af
MD5 e6d863c5a5653c0cbea9b334bc3be12f
BLAKE2b-256 83925300655e100994d78e23cb37243d85e6eedac0f326db2b0bec34cca208e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.216.dev0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 ae19c757353f2fb10f817a42617a2b6a48a6a8af0c46cf4e5bbbefa54539ce03
MD5 e07b0209dbfec2b5bc70d669dde77da2
BLAKE2b-256 47d50b686162bee0ddc008470e3a6ef4bbed4ee49438415666f5050520d66842

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.216.dev0-py3-none-win32.whl
Algorithm Hash digest
SHA256 b12922f10f5278afcde0c2dce6db13e72096b992800d175b10089452d2844f6c
MD5 0fac538c49a27eee3dffd4692c3f057c
BLAKE2b-256 686f3fc94a815d0caa24120d3a68c0c74c5c6470523a9cfbc0a3fc6806651ae7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.216.dev0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 719cf735fb2ec455b0f317e2c6d24026bced0982daf445079bfdf6ab498015be
MD5 b97e0701618f0d0dbb40834836c9c860
BLAKE2b-256 24d97e0f4ef231063987ee1f137c4c3cd161b0e356aceafbaa550158a6ba7c6a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.216.dev0-py3-none-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 61a104ebc303990a45eace21d98950d1a9c45be00c1c0a72d3b0bda678ea3188
MD5 6cd472fbd626a223faa19257d095ba5c
BLAKE2b-256 9238752189aea0e3e4af3713ad96ddfa24b5423c670f0c40fe8a81b7297302bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.216.dev0-py3-none-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 7a4c8945250d033ea0b4501f8a124be9687285d994a8f9467970b4a266eabd0c
MD5 079adaa5cbcf7dfc09ec59ddcdc4c101
BLAKE2b-256 2f211525dc196919ee7f0887dfac0f0d2e1fa63e94015b7c2e1eacaec8913843

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.216.dev0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 0449d0541c58ca6888e982310883bfd16e2d83c831531cf179db4bae9d73dc6d
MD5 56f41877426023574c8eafd2b53a565a
BLAKE2b-256 bd5799e7b8e150bbb662515f9ef7cca9037de3b661a2208d82d20b66fd629b26

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.216.dev0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8654b346df586fdfabe628c9d4f19b299444a9395e123ee5d727fe51edc160e7
MD5 268f5bea5ee309079c51566e1b0baf3a
BLAKE2b-256 8ff4840ce2fa23a3f60b8cd5745bfaf4adb1b402e1356e48f8ac8d46a4baf4e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.216.dev0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 2aea7915e5c428268646ca30521308ee708813f4a79a8ae54191389508cbdc1f
MD5 66e21ca53bab16d821e3174d1cbc8fe8
BLAKE2b-256 1c3438968ec34e0e033fdde52a43af48dc9e31fcf753ecf26f22c3d7418c2443

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.216.dev0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 56fe0e917c465f187551cf76ac6b869bea2701b0653ec9ee6ecd32e2addcd390
MD5 8127315f50849fd461f2936f746a27d4
BLAKE2b-256 f37d246ec09177a7dfc65326fecddf76c779dd3471186dd2b82601a01c2354b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.216.dev0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 10b23bed9e16b2761c59890bed0dd51a71ed248f0051952dc44ff0a8e1d8d199
MD5 2bd183c7a1240710858e42c51bc134a9
BLAKE2b-256 300d607ca0a2fe96cb32308994ad06adb735546ee7a82c74d4fc32035bd45b1e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.216.dev0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 b0953700619dfd319d6d172d0f56f87a638ceecec22d841b11290c78c6254828
MD5 a0c73cde0f557e4397b0bc11c93cdacf
BLAKE2b-256 6a0a7400dcb50147f926c4c292c71763b83e466bffd600e8db32b8c6f1d0e816

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.216.dev0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 9089bcf1669a863069249bdeb6771300ce4e3e54405291563aff3cd69a659643
MD5 f1f300e36cfb2af41da6dddc8109750c
BLAKE2b-256 ec73592abaaa5c3f0a9d7c50fdc26e7c59cb419d6ba83b15738b076312aebf85

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.216.dev0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f06e375d07b72971c536a1f4780a2b1c6630c7ce1ff03bef70154cc0f36d5390
MD5 503f138c8f4256073c8f4bf7b725baf9
BLAKE2b-256 67df2504230f1279ade66f83a99b951a639b3c11a396c9bbd55c7a36d006325f

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.216.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.216.dev0-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f85889b75c73ffd37daed17e0c7fca67738aeb2a4ac2f71c2dd2b95f55093204
MD5 7437fa454815d7bf15facb662d2b3ac6
BLAKE2b-256 1c3743b90c2bdf5ce57418a18b5c53344d5d23e5bdd22cc33684fa01def3564f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.216.dev0-py3-none-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 11e1d55759242f69dd854480d66ff3440bd68a5ba200bd31d2f11b332d593e37
MD5 be218aebd331c65a0c2098e7e7e7a558
BLAKE2b-256 8f1a51a5e40c091f6d3fef996abbf13f3e31172c0b516b45a773bc088804a948

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