File tree Expand file tree Collapse file tree 3 files changed +45
-19
lines changed Expand file tree Collapse file tree 3 files changed +45
-19
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+
3
+ name : Linting
4
+ on : [pull_request]
5
+
6
+ jobs :
7
+ flake8 :
8
+ name : flake8
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v2
12
+
13
+ - name : Set up Python 3
14
+ uses : actions/setup-python@v1
15
+ with :
16
+ python-version : 3.8
17
+
18
+ - name : Install flake8
19
+ run : pip3 install 'flake8>=3.8'
20
+
21
+ - name : Set up reviewdog
22
+ run : |
23
+ mkdir -p "$HOME/bin"
24
+ curl -sfL \
25
+ https://github.com/reviewdog/reviewdog/raw/master/install.sh | \
26
+ sh -s -- -b "$HOME/bin"
27
+ echo "$HOME/bin" >> $GITHUB_PATH
28
+
29
+ - name : Run flake8
30
+ env :
31
+ REVIEWDOG_GITHUB_API_TOKEN : ${{ secrets.GITHUB_TOKEN }}
32
+ run : |
33
+ set -o pipefail
34
+ flake8 | \
35
+ reviewdog -f=pep8 -name=flake8 \
36
+ -tee -reporter=github-check -filter-mode nofilter
Original file line number Diff line number Diff line change 1
- from ._version import version_info , __version__
1
+ from ._version import version_info , __version__ # noqa: F401
2
2
3
3
from pathlib import Path
4
4
@@ -8,7 +8,8 @@ def get_html_theme_path():
8
8
return [str (Path (__file__ ).parent .parent .resolve ())]
9
9
10
10
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
12
13
def setup (app ):
13
14
app .add_html_theme ("mpl_sphinx_theme" ,
14
15
str (Path (__file__ ).parent .resolve ()))
Original file line number Diff line number Diff line change 3
3
# https://flake8.readthedocs.io/en/latest/user/configuration.html
4
4
# https://flake8.readthedocs.io/en/latest/user/error-codes.html
5
5
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
You can’t perform that action at this time.
0 commit comments