From 2a75a71ba2ce807debe3fcddf7cbb89d2eef0c98 Mon Sep 17 00:00:00 2001 From: Eric Redon Date: Wed, 6 May 2020 15:58:36 +0200 Subject: [PATCH] Initial commit of Flake8 as a development requirement --- CONTRIBUTING.md | 8 ++++++++ setup.cfg | 12 ++++++++++++ setup.py | 1 + 3 files changed, 21 insertions(+) create mode 100644 setup.cfg diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 200d544..60a40c0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,3 +19,11 @@ python -m piptools compile --output-file=requirements.txt ```sh python -m pip install -e ".[dev]" ``` + +### How to run a linter? + +Run [Flake8](https://flake8.pycqa.org/): + +```sh +python -m flake8 +``` diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..82b9dc4 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,12 @@ +[flake8] +# Recommend matching the black line length (default 88), +# rather than using the flake8 default of 79: +max-line-length = 88 + +extend-ignore = + # Currently, `pycodestyle` gives false positives on the spaces black uses for slices, + # which flake8 reports as “Whitespace before ':' (E203)”. This is why we chose to ignore + # E203 until a version of flake8 is released with a fix of: + # https://github.com/PyCQA/pycodestyle/issues/373 is closed. + # https://www.flake8rules.com/rules/E203.html + E203, diff --git a/setup.py b/setup.py index ad8e5f3..5a420c5 100644 --- a/setup.py +++ b/setup.py @@ -5,6 +5,7 @@ requirements = [ ] dev_requirements = [ + "flake8", "pip-tools", ]