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.105_dev.0.tar.gz (255.0 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.105_dev.0-py3-none-win_amd64.whl (627.3 kB view details)

Uploaded Python 3Windows x86-64

flake8_to_ruff-0.0.105_dev.0-py3-none-win32.whl (569.5 kB view details)

Uploaded Python 3Windows x86

flake8_to_ruff-0.0.105_dev.0-py3-none-musllinux_1_2_x86_64.whl (754.6 kB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

flake8_to_ruff-0.0.105_dev.0-py3-none-musllinux_1_2_i686.whl (713.9 kB view details)

Uploaded Python 3musllinux: musl 1.2+ i686

flake8_to_ruff-0.0.105_dev.0-py3-none-musllinux_1_2_armv7l.whl (636.2 kB view details)

Uploaded Python 3musllinux: musl 1.2+ ARMv7l

flake8_to_ruff-0.0.105_dev.0-py3-none-musllinux_1_2_aarch64.whl (662.4 kB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

flake8_to_ruff-0.0.105_dev.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (711.0 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

flake8_to_ruff-0.0.105_dev.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (828.5 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ s390x

flake8_to_ruff-0.0.105_dev.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (738.7 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64le

flake8_to_ruff-0.0.105_dev.0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (750.3 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64

flake8_to_ruff-0.0.105_dev.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (625.8 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARMv7l

flake8_to_ruff-0.0.105_dev.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (650.3 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

flake8_to_ruff-0.0.105_dev.0-py3-none-manylinux_2_5_i686.manylinux1_i686.whl (710.4 kB view details)

Uploaded Python 3manylinux: glibc 2.5+ i686

flake8_to_ruff-0.0.105_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.105_dev.0-py3-none-macosx_10_7_x86_64.whl (681.8 kB view details)

Uploaded Python 3macOS 10.7+ x86-64

File details

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

File metadata

  • Download URL: flake8_to_ruff-0.0.105_dev.0.tar.gz
  • Upload date:
  • Size: 255.0 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.105_dev.0.tar.gz
Algorithm Hash digest
SHA256 a453afc9d8cd6e5776cc776773c142ad003da37c1d6317d11e5200d577988b92
MD5 fb5d8396d7c760ee3e846e80e0aba5dd
BLAKE2b-256 99d8d0098291bf119db4906223e47442ea3fb8618ade4269fe2abb463ea7adc7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.105_dev.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 ddc9a99fa944e71de6ec38d957ed88c17380ef9239a2697c671748fb27e96a1e
MD5 59767b4c88512a4d026595f801466a8f
BLAKE2b-256 565db0f5e140364729475ce4f633d5606932a2b776ad5742b1575da38beb9302

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.105_dev.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 e08a1e82f51a8157892e67602e6684086b9a064dd644b7a9bba44b561e825a09
MD5 796efd33c05a2c1660f969b3877a04ea
BLAKE2b-256 e863bfaf2af49d6605dd80777804943f9c55b240b60fe2c597b99db897be73c8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.105_dev.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 df4481cba2e5ee569339829aa82bac97d206944529219899240e0bb068802e40
MD5 c19d99f69bc7025fbe14f14be356c26c
BLAKE2b-256 af0f1f8a24c1fb5c009cb24c654e09613f61dcbb82c3a51cef1b778adb107698

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.105_dev.0-py3-none-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 157fa1996b372ebaef59395f059a0ace5050c1ecdf52ceee3f5f1c1cb4198c10
MD5 ecf951bdb4d834fb0f88e8547fc888e1
BLAKE2b-256 669f015c505d7511349adda092962bd9f4f25e3661be0b3f1b01fc3c0f5c09bd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.105_dev.0-py3-none-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 57f79ca95441904798387f9d82d2598e96c0aec580412ae0feac8db6d6a8364f
MD5 3f53bedc828caed8622ba17d5eb378c5
BLAKE2b-256 1c2a30630f79e1dfdfa25f04b1adcf1ce9a31b7f8fcecb1e303ba16afb20a28a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.105_dev.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 871efb1f6bf347b368f06ef33a7f358beaa64e5e5794e2f9e8ffd3af155073e9
MD5 67da3bfcd4239f04ebb4a3717986093b
BLAKE2b-256 3d0849be51515a0e070f026943fdfbb335e2f53420e40633798657533e9efe5d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.105_dev.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 23a1154b8e3d46849eaa10e63fb1da29d315abe4ce2b15eb1dd7ef16e3f45cae
MD5 e7b32c788829886e2654c2c5e2c119b7
BLAKE2b-256 bb0386bb550e14f37cd117c38477296c91a618f232e79418ee2095c87c4503bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.105_dev.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 f6959732c57dbe3ffdf75551240b01bcb590bde902ba7900b7508d2f5c615785
MD5 dacc9079a3844345391bb3fa344fbade
BLAKE2b-256 19d875379239eeac9afab209b7de77e87267d65e24e3e0fa0033dcddb7853499

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.105_dev.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 43977afaf517b5f128fd721dcf1e61ea5b0bc654f0ce9b285cc5b1d8d087d796
MD5 6017421f055c84270c61a44292a2ea0f
BLAKE2b-256 38a8fdf1030ed173759d08551a10e4f4e4f07eb21697f08fe978c9212cfdf746

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.105_dev.0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 8056aa14a5eaaf40a9622a9e0830226eda58841033b3012d6660585abcc14b12
MD5 6447ce6e1f2721b70e09e2a66dde4b3f
BLAKE2b-256 08c0f7178fddeef976d92b874a9567db25e11f6fd7656477debf0db3906823e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.105_dev.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 4191c422e69e85ba6ddee18c395a162efb06553d6d7c777b0c20f7c6c1dfae11
MD5 747189953fed3317881549700dac483d
BLAKE2b-256 51cb044b27ecccefcffe81711ba6903e96a71295129bf8bd4cd22923addacb29

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.105_dev.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1449b562609e6aa86c3d7cc3f61457ffa64eec407f49c68edcbf67b3a6527577
MD5 740c7c71b475f7c7390279ff37992dbb
BLAKE2b-256 59212c3fcf6c9dd6ce48aeea43df073ff0f6b5cb4a7c4409bfcc7baebb06720f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.105_dev.0-py3-none-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 6637bfee8f4d514315133817de8f6023fc86c0773faf8d6c1deb93c7fdd0cd4f
MD5 23008f1675a29f04d501926dccc4f66c
BLAKE2b-256 c4ae185506ce9d6e4d04ed61d58a30f0d3458e8c64f862c91f46ae55085cfad6

See more details on using hashes here.

File details

Details for the file flake8_to_ruff-0.0.105_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.105_dev.0-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 86bbc70bd0fbc89796087fbb99dd372c09c726e784ddaa84ab6928e3048bfdcb
MD5 b17b1b3431bea7d9d7be7b96038bcb2a
BLAKE2b-256 74a08bd7a5f3579135ef245a790d0b827b9da9815d4fcdf0b3273460b36af381

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_to_ruff-0.0.105_dev.0-py3-none-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 8c6530b2d4fd9d1a84b9938b82426d9ede1426ccb0fa2c6405d8317bd135387b
MD5 8459d2516d47a19d5bc16e5c3f685af0
BLAKE2b-256 c90bb72c3e05679ac341619c9985c9c48777f3ea77a8d5a0a97ccc5dc107e555

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