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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
2c7cd1b4
Commit
2c7cd1b4
authored
Mar 28, 2016
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some pylint findings
parent
4479bf15
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
Cython/Compiler/Visitor.py
Cython/Compiler/Visitor.py
+5
-8
No files found.
Cython/Compiler/Visitor.py
View file @
2c7cd1b4
...
...
@@ -77,9 +77,8 @@ class TreeVisitor(object):
self
.
access_path
=
[]
def
dump_node
(
self
,
node
,
indent
=
0
):
ignored
=
list
(
node
.
child_attrs
or
[])
+
[
u'child_attrs'
,
u'pos'
,
u'gil_message'
,
u'cpp_message'
,
u'subexprs'
]
ignored
=
list
(
node
.
child_attrs
or
[])
+
[
u'child_attrs'
,
u'pos'
,
u'gil_message'
,
u'cpp_message'
,
u'subexprs'
]
values
=
[]
pos
=
getattr
(
node
,
'pos'
,
None
)
if
pos
:
...
...
@@ -93,7 +92,7 @@ class TreeVisitor(object):
for
attr
in
attribute_names
:
if
attr
in
ignored
:
continue
if
attr
.
startswith
(
u'_'
)
or
attr
.
endswith
(
u
'_'
):
if
attr
.
startswith
(
'_'
)
or
attr
.
endswith
(
'_'
):
continue
try
:
value
=
getattr
(
node
,
attr
)
...
...
@@ -108,8 +107,7 @@ class TreeVisitor(object):
else
:
value
=
repr
(
value
)
values
.
append
(
u'%s = %s'
%
(
attr
,
value
))
return
u'%s(%s)'
%
(
node
.
__class__
.
__name__
,
u',
\
n
'
.
join
(
values
))
return
u'%s(%s)'
%
(
node
.
__class__
.
__name__
,
u',
\
n
'
.
join
(
values
))
def
_find_node_path
(
self
,
stacktrace
):
import
os.path
...
...
@@ -129,7 +127,6 @@ class TreeVisitor(object):
return
(
last_traceback
,
nodes
)
def
_raise_compiler_error
(
self
,
child
,
e
):
import
sys
trace
=
[
''
]
for
parent
,
attribute
,
index
in
self
.
access_path
:
node
=
getattr
(
parent
,
attribute
)
...
...
@@ -389,7 +386,7 @@ class EnvTransform(CythonTransform):
def
visit_CArgDeclNode
(
self
,
node
):
# default arguments are evaluated in the outer scope
if
node
.
default
:
attrs
=
[
attr
for
attr
in
node
.
child_attrs
if
attr
!=
'default'
]
attrs
=
[
attr
for
attr
in
node
.
child_attrs
if
attr
!=
'default'
]
self
.
visitchildren
(
node
,
attrs
)
self
.
enter_scope
(
node
,
self
.
current_env
().
outer_scope
)
self
.
visitchildren
(
node
,
(
'default'
,))
...
...
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