from typing import Any, Optional, TYPE_CHECKING
if TYPE_CHECKING:
from toolbox import inject_css_safe
# bleh
# later in code used as
inject_css_safe("ablooo")
toolbox.py:
(gets appended to main.py )
def inject_css_safe(whatever: str):
#bleh-blah
In the final merged file:
redefinition of unused 'inject_css_safe' from line 9Flake8(F811)
While the setup is unusual, the bug is still valid. Only flake8/pyflake reports this issue, mypy, pylint and Pylance are silent as a buddha.
flake8==7.0.0
Consider the following: main.py:
toolbox.py: (gets appended to
main.py
)In the final merged file:
redefinition of unused 'inject_css_safe' from line 9Flake8(F811)
While the setup is unusual, the bug is still valid. Only flake8/pyflake reports this issue,
mypy
,pylint
and Pylance are silent as a buddha.