-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
Description
Bug Report
When running stubgen on a module that contains a debug f-string, stubgen reports a "Critical error" and reports the wrong python version.
To Reproduce
# mod.py
def fn() -> int:
i = 5
print(f'{i=}')
return 0
C:\> stubgen mod.py
Critical error during semantic analysis: mod.py:3: error: f-string: self documenting expressions are only supported in Python 3.8 and greater
Expected Behavior
C:\> stubgen mod.py
Processed 1 modules
Generated out\mod.pyi
Actual Behavior
C:\> stubgen mod.py
Critical error during semantic analysis: mod.py:3: error: f-string: self documenting expressions are only supported in Python 3.8 and greater
Your Environment
- Mypy version used: 0.910
- Mypy command-line flags: none
- Mypy configuration options from
mypy.ini(and other config files): None - Python version used: 3.9.6 (no other Pythons installed)
- Operating system and version: Win 10.0.19043