Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
47dc1182
Commit
47dc1182
authored
May 29, 2006
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #1494787 (pyclbr counts whitespace as superclass name)
parent
80181e2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
Lib/pyclbr.py
Lib/pyclbr.py
+4
-2
No files found.
Lib/pyclbr.py
View file @
47dc1182
...
...
@@ -42,7 +42,7 @@ Instances of this class have the following instance variables:
import
sys
import
imp
import
tokenize
# Python tokenizer
from
token
import
NAME
,
DEDENT
,
NEWLINE
from
token
import
NAME
,
DEDENT
,
NEWLINE
,
OP
from
operator
import
itemgetter
__all__
=
[
"readmodule"
,
"readmodule_ex"
,
"Class"
,
"Function"
]
...
...
@@ -219,8 +219,10 @@ def _readmodule(module, path, inpackage=None):
break
elif
token
==
','
and
level
==
1
:
pass
else
:
# only use NAME and OP (== dot) tokens for type name
elif
tokentype
in
(
NAME
,
OP
)
and
level
==
1
:
super
.
append
(
token
)
# expressions in the base list are not supported
inherit
=
names
cur_class
=
Class
(
fullmodule
,
class_name
,
inherit
,
file
,
lineno
)
if
not
stack
:
...
...
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