mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-07 21:44:18 +00:00
fix: Check for presence of alt separator & separator together
This commit is contained in:
parent
a2b02b8920
commit
5e0f097ac7
1 changed files with 1 additions and 1 deletions
|
|
@ -176,7 +176,7 @@ def normalize_path(path: str, parent: str = os.curdir) -> str:
|
||||||
if (
|
if (
|
||||||
path == "."
|
path == "."
|
||||||
or separator in path
|
or separator in path
|
||||||
or (alternate_separator and alternate_separator in path)
|
or (alternate_separator and separator in path)
|
||||||
):
|
):
|
||||||
path = os.path.abspath(os.path.join(parent, path))
|
path = os.path.abspath(os.path.join(parent, path))
|
||||||
return path.rstrip(separator + alternate_separator)
|
return path.rstrip(separator + alternate_separator)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue