Show More
@@ -93,7 +93,7 b' def get_parent(globals, level):' | |||
|
93 | 93 | else: |
|
94 | 94 | # Normal module, so work out the package name if any |
|
95 | 95 | lastdot = modname.rfind('.') |
|
96 |
if lastdot < 0 |
|
|
96 | if lastdot < 0 < level: | |
|
97 | 97 | raise ValueError("Attempted relative import in non-package") |
|
98 | 98 | if lastdot < 0: |
|
99 | 99 | globals['__package__'] = None |
@@ -235,7 +235,7 b' class Parser:' | |||
|
235 | 235 | return |
|
236 | 236 | |
|
237 | 237 | # map token type to a color group |
|
238 |
if token.LPAR <= toktype |
|
|
238 | if token.LPAR <= toktype <= token.OP: | |
|
239 | 239 | toktype = token.OP |
|
240 | 240 | elif toktype == token.NAME and keyword.iskeyword(toktext): |
|
241 | 241 | toktype = _KEYWORD |
General Comments 0
You need to be logged in to leave comments.
Login now