Skip to main content

Flake8

Supported VersionLanguageWebsite
3.9.2Pythonhttps://flake8.pycqa.org

Flake8 is a linter to check the style and quality of Python code.

Getting Started#

To start using Flake8, enable it in your repository settings.

To customize Flake8, put a .flake8 file in your repository.

Default Configuration for Flake8#

Sider provides our recommended ruleset for Flake8. If your repository does not include .flake8, setup.cfg or tox.ini, the recommended ruleset will be used. For more details, please visit Recommended Ruleset.

Configuration#

Here is an example configuration via sider.yml:

linter:  flake8:    dependencies:      - flake8-bugbear      - flake8-builtins==1.4.1    target: src/    config: .config/.flake8    parallel: false

You can use several options to fine-tune Flake8 to your project.

NameTypeDefault
root_dirstring-
dependenciesstring[], map[]-
targetstring, string[].
configstring-
parallelbooleantrue

plugins#

This is an alias for dependencies.

target#

This option allows you to specify files or directories to analyze.

config#

This option allows you to specify a configuration file you want to use.

parallel#

This option allows you to control if an analysis runs in parallel mode.