Skip to content

Commit 2a4a97f

Browse files
flake8: add setup.cfg & fix existing issues
1 parent 7be0371 commit 2a4a97f

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

python/wisun/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@
1010
This is the GNU Radio WISUN module. Place your Python package
1111
description here (python/__init__.py).
1212
'''
13-
import os
1413

1514
# import pybind11 generated symbols into the wisun namespace
1615
try:
1716
# this might fail if the module is python-only
18-
from .wisun_python import *
17+
from .wisun_python import * # noqa
1918
except ModuleNotFoundError:
2019
pass
2120

setup.cfg

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[flake8]
2+
# See
3+
# - flake8 error codes: https://flake8.pycqa.org/en/latest/user/error-codes.html
4+
# - pycodestyle error codes: https://pep8.readthedocs.io/en/latest/intro.html#error-codes
5+
#
6+
# ⇒ nothing disabled; we're fully pep8 compatible
7+
max-line-length=120
8+
9+
[pycodestyle]
10+
# for using pycodestyle directly; same as for flake8 and
11+
# additionally (because pycodestyle ignores 'noqa'):
12+
#
13+
# W504: line break after binary operator
14+
# E241: multiple spaces after ',' (prevents nice formatting in some cases)
15+
ignore=W504,E241
16+
max-line-length=120

0 commit comments

Comments
 (0)