Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
dad0100c
Commit
dad0100c
authored
Feb 23, 2019
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move pycodestyle config to setup.cfg and constrain the files that it gets applied to.
parent
ff75c966
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
11 deletions
+12
-11
runtests.py
runtests.py
+5
-3
setup.cfg
setup.cfg
+7
-2
tox.ini
tox.ini
+0
-6
No files found.
runtests.py
View file @
dad0100c
...
@@ -1586,10 +1586,12 @@ class TestCodeFormat(unittest.TestCase):
...
@@ -1586,10 +1586,12 @@ class TestCodeFormat(unittest.TestCase):
def runTest(self):
def runTest(self):
import pycodestyle
import pycodestyle
config_file = os.path.join(self.cython_dir, "
tox.ini
")
config_file = os.path.join(self.cython_dir, "
setup.cfg
")
if not os.path.exists(config_file):
if not os.path.exists(config_file):
config_file=os.path.join(os.path.dirname(__file__), "tox.ini")
config_file=os.path.join(os.path.dirname(__file__), "setup.cfg")
paths = glob.glob(os.path.join(self.cython_dir, "**/*.py"), recursive=True)
paths = []
for codedir in ['Cython', 'Demos', 'docs', 'pyximport', 'tests']:
paths += glob.glob(os.path.join(self.cython_dir, codedir + "/**/*.py"), recursive=True)
style = pycodestyle.StyleGuide(config_file=config_file)
style = pycodestyle.StyleGuide(config_file=config_file)
print("") # Fix the first line of the report.
print("") # Fix the first line of the report.
result = style.check_files(paths)
result = style.check_files(paths)
...
...
setup.cfg
View file @
dad0100c
[flake8]
[flake8]
exclude = .git,build,__pycache__
max-complexity = 10
max-complexity = 10
max-line-length = 120
[pycodestyle]
exclude = .git,build,__pycache__,venv*,TEST*
max-line-length = 150
format = pylint
select = E711, E714, E501, W291
#ignore = W, E
ignore =
ignore =
W504,
W504,
# W504 line break after binary operator
# W504 line break after binary operator
...
...
tox.ini
View file @
dad0100c
...
@@ -10,9 +10,3 @@ envlist = py26, py27, py32, py33, py34, pypy
...
@@ -10,9 +10,3 @@ envlist = py26, py27, py32, py33, py34, pypy
setenv
=
CFLAGS=-O0 -ggdb
setenv
=
CFLAGS=-O0 -ggdb
commands
=
commands
=
{envpython}
runtests.py
-vv
{envpython}
runtests.py
-vv
[pycodestyle]
ignore
=
W, E
select
=
E711, E714, E501, W291
max-line-length
=
150
format
=
pylint
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment