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.196.dev0.tar.gz (553.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.196.dev0-py3-none-win_amd64.whl (728.3 kB view details)

Uploaded Python 3Windows x86-64

flake8_to_ruff-0.0.196.dev0-py3-none-win32.whl (667.5 kB view details)

Uploaded Python 3Windows x86

flake8_to_ruff-0.0.196.dev0-py3-none-musllinux_1_2_x86_64.whl (854.2 kB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

flake8_to_ruff-0.0.196.dev0-py3-none-musllinux_1_2_i686.whl (808.5 kB view details)

Uploaded Python 3musllinux: musl 1.2+ i686

flake8_to_ruff-0.0.196.dev0-py3-none-musllinux_1_2_armv7l.whl (729.5 kB view details)

Uploaded Python 3musllinux: musl 1.2+ ARMv7l

flake8_to_ruff-0.0.196.dev0-py3-none-musllinux_1_2_aarch64.whl (752.0 kB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

flake8_to_ruff-0.0.196.dev0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (810.8 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

flake8_to_ruff-0.0.196.dev0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (994.5 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ s390x

flake8_to_ruff-0.0.196.dev0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (855.1 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64le

flake8_to_ruff-0.0.196.dev0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (864.5 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64

flake8_to_ruff-0.0.196.dev0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (815.3 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ i686

flake8_to_ruff-0.0.196.dev0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (719.6 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARMv7l

flake8_to_ruff-0.0.196.dev0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (740.4 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

flake8_to_ruff-0.0.196.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.196.dev0-py3-none-macosx_10_7_x86_64.whl (799.1 kB view details)

Uploaded Python 3macOS 10.7+ x86-64

File details

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

File metadata

  • Download URL: flake8_to_ruff-0.0.196.dev0.tar.gz
  • Upload date:
  • Size: 553.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.196.dev0.tar.gz
Algorithm Hash digest
SHA256 eda53a943fad0f81d1b3eee57255ec1fdc7611f28d5ab874797750210f363fd6
MD5 dee5368aa77412e4a3a68bd0253332ea
BLAKE2b-256 f918b92dc4686ce8ced8b14be0a8f7d852f9af27909cafa3f0ef95e68080f9aa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.196.dev0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 34d5517d71700477d137bc72bb6402f7d1ffdca5b6cde37b28ed5a01d82c513f
MD5 47a42c427091b703bba210d65f6c1f6f
BLAKE2b-256 f1f9e540bcc287eff90a979c809740ce0abeccf228f60546d456ff195417109d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.196.dev0-py3-none-win32.whl
Algorithm Hash digest
SHA256 eec6ffef7fd387ce185e4d84ad599264b5b3965a199aa8f9305448a2b3ed2483
MD5 8757c61cbbc6ef6da5656a3f9e8882e9
BLAKE2b-256 33317b3e37bc0e5abedf9ee82d9df0062174279ea664be61e72bd0901c287797

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.196.dev0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0a9ebc66e597f0aef692486ff14d9d8cd7d3812feaf56728e0a93a693b881ac5
MD5 e8fc6095c06a5108b49df21e6ee0f10b
BLAKE2b-256 ce1c2a0b8fc7b7d8b004bb387bf29bd5f09a3a2ec5912d1cbd39cabfe556fc3a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.196.dev0-py3-none-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 fcda3f5ba74fea925040ce557e139df4716886858d37703073fff75d069b50af
MD5 1338d5db86fcadcac9c6b49607217576
BLAKE2b-256 33e91ce5db76da0a61bc544758e043b449d715f0a66f5bc05b9dbafe530e21a3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.196.dev0-py3-none-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 1a820f28c468d2de90a017f272ddda6f6c158849e605ef6455e0857ac09b98f9
MD5 3cb32ee736f013ae3daa3f4dfb2ef245
BLAKE2b-256 f038652e2bbfc7adad168fbdab75135927bd961e83bda962c27364abc415921c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.196.dev0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 4976ced75bb3a7834d041511e58aa82a5dc0762aade0b350c23126dceb233961
MD5 16fda01ba46eb5aa24f79d67dff51556
BLAKE2b-256 9edfb484c46d8aed5ed2f198b4d9501d895268a1084dbd47a985d18d43a76646

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.196.dev0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 452b15f9ac99cd4a546b200a5bddb8f994f2663a3bd36738d33b167a9a8281ed
MD5 e5fcf79534186c27072ff187fe5e9740
BLAKE2b-256 3868423696c2c146e20eb66d126083b7ebfb06477e8e500ae58871f9d7d7d9bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.196.dev0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 bc246caa7261c1fd3d3f8b371b4ee5d51192e971590ab4407fbc2fb552508e67
MD5 817ac5d8dbeb95d271cc16e0d94ca972
BLAKE2b-256 4a6aa59df142e2ee77cb6f947470b1bb643ce0341b5247ead9d72447f70aaeb6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.196.dev0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 023578649c031fd72d3ef28c8c6d72bf6ee24b9fe35ecd20853c6de0ea93f229
MD5 9d5a5fc8ce94555ad99ada6c17f7229a
BLAKE2b-256 b68fb16b181563c7216ed1e90da8961662a118150fe10916ea69a5cdb35f71cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.196.dev0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 7c907a16f0ef79d3e141164a0913b22e522039d5b6a96dfa264327ebdfade3e1
MD5 0056937ed310a3ac59842ee5a5decd8d
BLAKE2b-256 7d8a99c371d696341bf8855631bf082ec6a8a2d5e7721f3443f11d08acfef7a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.196.dev0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 e276597c4f252d86b9621010e0b4d9cb1ed56c15ebcfaaccf81338d402705c7d
MD5 ec58ab63954f1a6931c547e29446afff
BLAKE2b-256 d719ff6a68a97a5360b59d819e39523c40a8b09238c3224a804cd536b3146f9e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.196.dev0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 6ff62d2b5a3dffc10a7ccce24f617ce6c24401c3d92a1763fbd99551e2dbc66b
MD5 550df5e0a78713fa515917ce0e6eff4e
BLAKE2b-256 e159e39cd4832efcf2bdd9f0c0c5e74b440bc9879161cfd1ae9033a77ba99fde

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.196.dev0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b8c57cb5f71ac0f2b78fc4a3da8f2b703e2974e97c659f5046945d18cf8dbc48
MD5 c83d1973bc43e896959ecb29e9bd2265
BLAKE2b-256 02c99fafb327ad7d48b2d75af0c60c5ca596ad500bac5c59ac13d6f2d98259e6

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.196.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.196.dev0-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b4e2a65cc9750f8fb0c1636e3a79a055cc254f44de0422f6677cd0e0a201c598
MD5 e74124574163a4d3f050dfb2a5a77193
BLAKE2b-256 81bfbbd948fa3b2d0d9d7158b62ef4c3b9ab3b3c9fddded394859b578865c267

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.196.dev0-py3-none-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 12b30dae2b4503d32e572eabbb3795e1495030d95c286e9c575e6a69309982d3
MD5 d83bc473a95e0df4cf5bac556f380be3
BLAKE2b-256 8c40ad44a0d559d3eba2dba2d1f11fe2d2d3bb4b649c1d9138aa53ece3770df6

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