Skip to content

Commit ad2cc68

Browse files
author
Jacob Roberts
committed
RF: Run linting check over whole source tree, use setup.cfg to configure flake8 (closer aligns to pep8speaks bot behavior)
1 parent 8dac77c commit ad2cc68

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

doc/source/dicom/derivations/spm_dicom_orient.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def numbered_vector(nrows, symbol_prefix):
4646
R = zeros(4, 2)
4747
R[:3, :] = R3
4848

49-
# The following is specific to the SPM algorithm.
49+
# The following is specific to the SPM algorithm.
5050
x1 = ones(4, 1)
5151
y1 = ones(4, 1)
5252
y1[:3, :] = pos_pat_0

doc/source/scripts/make_coord_examples.py

+3
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
x, y = 0, 1
6969
# Make a rectangular box with these sides
7070

71+
7172
def make_ortho_box(bl, x_len, y_len):
7273
""" Make a box with sides parallel to the axes
7374
"""
@@ -76,6 +77,7 @@ def make_ortho_box(bl, x_len, y_len):
7677
[bl[x], bl[y] + y_len],
7778
[bl[x] + x_len, bl[y] + y_len]))
7879

80+
7981
orth_epi_box = make_ortho_box(epi_bl, epi_x_len, epi_y_len)
8082

8183
# Structural bounding box
@@ -126,6 +128,7 @@ def plot_localizer():
126128
def save_plot():
127129
# Plot using global variables
128130
plot_localizer()
131+
129132
def vx2mm(pts):
130133
return pts - iso_center
131134
plot_box(vx2mm(rot_box), label='EPI bounding box')

doc/tools/build_modref_templates.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def abort(error):
3737

3838
try:
3939
__import__(package)
40-
except ImportError as e:
40+
except ImportError:
4141
abort("Can not import " + package)
4242

4343
module = sys.modules[package]
@@ -73,7 +73,7 @@ def abort(error):
7373
if source_version != installed_version:
7474
abort(
7575
"Installed version does not match source version. "
76-
"source_version=" + str(source_version) +
76+
"source_version=" + str(source_version) +
7777
"installed_version=" + str(installed_version)
7878
)
7979

setup.cfg

+7
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,17 @@ nibabel =
9696
max-line-length = 100
9797
ignore = D100,D101,D102,D103,D104,D105,D200,D201,D202,D204,D205,D208,D209,D210,D300,D301,D400,D401,D403,E24,E121,E123,E126,E226,E266,E402,E704,E731,F821,I100,I101,I201,N802,N803,N804,N806,W503,W504,W605
9898
exclude =
99+
venv
100+
build
99101
*test*
100102
*sphinx*
101103
nibabel/externals/*
102104
*/__init__.py
105+
# temporary -- should be removed in another PR
106+
./doc/source/conf.py
107+
./doc/tools/apigen.py
108+
./nisext
109+
./tools
103110

104111
[versioneer]
105112
VCS = git

tools/ci/check.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ set -x
1414
export NIBABEL_DATA_DIR="$PWD/nibabel-data"
1515

1616
if [ "${CHECK_TYPE}" == "style" ]; then
17-
# Run styles only on core nibabel code.
18-
flake8 nibabel
17+
flake8
1918
elif [ "${CHECK_TYPE}" == "doc" ]; then
2019
cd doc
2120
make html && make doctest

0 commit comments

Comments
 (0)