Skip to content

Commit

Permalink
move .flake8 to setup.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
bjlittle committed Jun 17, 2021
1 parent bc3b748 commit 9d84c5a
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 50 deletions.
48 changes: 0 additions & 48 deletions .flake8

This file was deleted.

2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Expand Up @@ -28,4 +28,4 @@ repos:
hooks:
# Run flake8.
- id: flake8
args: [--config=./.flake8]
args: [--config=./setup.cfg]
3 changes: 3 additions & 0 deletions docs/src/whatsnew/latest.rst
Expand Up @@ -175,6 +175,9 @@ This document explains the changes made to Iris for this release

#. `@bjlittle`_ refactored ``setup.py`` into ``setup.cfg``. (:pull:`4168`)

#. `@bjlittle`_ consolidated the ``.flake8`` configuration into ``setup.cfg``.
(:pull:`4200`)

.. comment
Whatsnew author names (@github name) in alphabetical order. Note that,
core dev names are automatically included by the common_links.inc:
Expand Down
51 changes: 50 additions & 1 deletion setup.cfg
Expand Up @@ -92,4 +92,53 @@ all =
pyugrid
stratify
%(docs)s
%(test)s
%(test)s

[flake8]
# References:
# https://flake8.readthedocs.io/en/latest/user/configuration.html
# https://flake8.readthedocs.io/en/latest/user/error-codes.html
# https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes

max-line-length = 80
select = C,E,F,W,B,B950
ignore =
# E203: whitespace before ':'
E203,
# E226: missing whitespace around arithmetic operator
E226,
# E231: missing whitespace after ',', ';', or ':'
E231,
# E402: module level imports on one line
E402,
# E501: line too long
E501,
# E731: do not assign a lambda expression, use a def
E731,
# W503: line break before binary operator
W503,
# W504: line break after binary operator
W504,
exclude =
#
# ignore the following directories
#
.eggs,
build,
compiled_krb,
docs/src/sphinxext/*,
tools/*,
#
# ignore auto-generated files
#
_ff_cross_refrences.py,
std_names.py,
um_cf_map.py,
#
# ignore third-party files
#
gitwash_dumper.py,
#
# convenience imports
#
lib/iris/common/__init__.py

0 comments on commit 9d84c5a

Please sign in to comment.