Skip to content

Commit a06377f

Browse files
committed
Remove all custom flake8 configuration
This is a new code base, so there's no need to ignore things. I was only going to sync with Matplotlib's config, but none of the existing code violated any of the additional ignores, and we only have those in Matplotlib to prevent mass changes. Also, we should definitely not ignore `__init__.py`, as that's the only file with code in it.
1 parent 21ac117 commit a06377f

File tree

2 files changed

+9
-19
lines changed

2 files changed

+9
-19
lines changed

mpl_sphinx_theme/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ._version import version_info, __version__
1+
from ._version import version_info, __version__ # noqa: F401
22

33
from pathlib import Path
44

@@ -8,7 +8,8 @@ def get_html_theme_path():
88
return [str(Path(__file__).parent.parent.resolve())]
99

1010

11-
# See https://www.sphinx-doc.org/en/master/development/theming.html#distribute-your-theme-as-a-python-package
11+
# For more details, see:
12+
# https://www.sphinx-doc.org/en/master/development/theming.html#distribute-your-theme-as-a-python-package
1213
def setup(app):
1314
app.add_html_theme("mpl_sphinx_theme",
1415
str(Path(__file__).parent.resolve()))

setup.cfg

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,9 @@
33
# https://flake8.readthedocs.io/en/latest/user/configuration.html
44
# https://flake8.readthedocs.io/en/latest/user/error-codes.html
55

6-
# Aligned with black https://github.com/psf/black/blob/main/.flake8
7-
extend-ignore = E203, E266, E501
8-
# Note: there cannot be spaces after commas here
9-
exclude = __init__.py,versioneer.py
10-
ignore =
11-
E4, # Import formatting
12-
E731, # Assigning lambda expression
13-
W503, # line break before binary operator
14-
15-
per-file-ignores =
16-
**/tests/*:
17-
# local variable is assigned to but never used
18-
F841,
19-
# Ambiguous variable name
20-
E741,
21-
22-
max-line-length = 88
6+
exclude =
7+
.git
8+
build
9+
# External files.
10+
.tox
11+
.eggs

0 commit comments

Comments
 (0)