Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Kirill Smelkov
gevent
Commits
bb11c1bb
Commit
bb11c1bb
authored
Mar 04, 2014
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix pyflakes check on py3
and ignore gevent/util_py2.py
parent
4dac1b65
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
24 deletions
+31
-24
util/pyflakes.py
util/pyflakes.py
+31
-24
No files found.
util/pyflakes.py
View file @
bb11c1bb
...
...
@@ -3,6 +3,7 @@ from __future__ import print_function
import
sys
import
re
import
subprocess
import
glob
IGNORED
=
r'''
...
...
@@ -31,35 +32,41 @@ def is_ignored(line):
return
True
popen
=
subprocess
.
Popen
(
'%s `which pyflakes` gevent/ examples/ greentest/*.py util/ *.py'
%
sys
.
executable
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
output
,
errors
=
popen
.
communicate
()
def
pyflakes
(
args
):
popen
=
subprocess
.
Popen
(
'%s `which pyflakes` %s'
%
(
sys
.
executable
,
args
),
shell
=
True
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
output
,
errors
=
popen
.
communicate
()
if
errors
:
sys
.
stderr
.
write
(
errors
.
decode
())
if
errors
:
sys
.
stderr
.
write
(
errors
.
decode
())
if
popen
.
poll
()
!=
1
:
sys
.
stderr
.
write
(
output
+
'
\
n
'
)
sys
.
exit
(
'pyflakes returned %r'
%
popen
.
poll
())
if
popen
.
poll
()
!=
1
:
sys
.
stderr
.
write
(
output
+
'
\
n
'
)
sys
.
exit
(
'pyflakes returned %r'
%
popen
.
poll
())
if
errors
:
sys
.
exit
(
1
)
if
errors
:
sys
.
exit
(
1
)
assert
output
assert
output
output
=
output
.
strip
().
split
(
'
\
n
'
)
failed
=
False
output
=
output
.
decode
(
'utf-8'
)
output
=
output
.
strip
().
split
(
'
\
n
'
)
failed
=
False
for
line
in
output
:
line
=
line
.
strip
()
if
not
is_ignored
(
line
):
print
(
'E %s'
%
line
)
failed
=
True
#else:
# print('I %s' % line)
for
line
in
output
:
line
=
line
.
strip
()
if
not
is_ignored
(
line
):
print
(
'E %s'
%
line
)
failed
=
True
#else:
# print('I %s' % line)
if
failed
:
sys
.
exit
(
1
)
if
failed
:
sys
.
exit
(
1
)
pyflakes
(
'examples/ greentest/*.py util/ *.py'
)
py
=
set
(
glob
.
glob
(
'gevent/*.py'
))
-
set
([
'gevent/_util_py2.py'
])
pyflakes
(
' '
.
join
(
py
))
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