We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c11124 commit 10da15bCopy full SHA for 10da15b
Lib/_pyrepl/_module_completer.py
@@ -223,9 +223,10 @@ def parse_import(self) -> Result:
223
raise ParseError('parse_import')
224
225
def parse_from_import(self) -> Result:
226
- if self.code.rstrip().endswith('import') and self.code.endswith(' '):
+ stripped = self.code.rstrip()
227
+ if stripped.endswith('import') and self.code.endswith(' '):
228
return Result(from_name=self.parse_empty_from_import(), name='')
- if self.code.rstrip().endswith('from') and self.code.endswith(' '):
229
+ if stripped.endswith('from') and self.code.endswith(' '):
230
return Result(from_name='')
231
if self.tokens.peek_string('(') or self.tokens.peek_string(','):
232
0 commit comments