You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.
On Windows, importing fixtures can still raise unused-import warnings.
In my case, this happens when linting with VSCode.
Debugging revealed that the bug is within pylint_pytest.utils._is_same_module(...):
if inspect.getmodule(fixture.func).__file__ == \
import_from.parent.import_module(import_from.modname,
False,
import_from.level).file:
The comparison is done without case normalization. However, Windows paths are case-insensitive.
In my case, the first path begins with c:\, whereas the second one begins with C:\.
Edit: Apparently, I don't have the permission to create a branch. But a simple solution would be:
Normalize both paths with os.path.normcase before comparing them.
The text was updated successfully, but these errors were encountered:
On Windows, importing fixtures can still raise
unused-import
warnings.In my case, this happens when linting with VSCode.
Debugging revealed that the bug is within
pylint_pytest.utils._is_same_module(...)
:The comparison is done without case normalization. However, Windows paths are case-insensitive.
In my case, the first path begins with
c:\
, whereas the second one begins withC:\
.Edit: Apparently, I don't have the permission to create a branch. But a simple solution would be:
Normalize both paths with os.path.normcase before comparing them.
The text was updated successfully, but these errors were encountered: