We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b2d79e commit 282b018Copy full SHA for 282b018
python/aliases.py
@@ -59,7 +59,7 @@ def imports_add(file):
59
pkg = str(file.parent.relative_to(root)).replace("/", ".")
60
if file.name == "__init__.py":
61
imports.append(pkg)
62
- elif file.name.endswith(".py"):
+ elif file.suffix == ".py":
63
imports.append(pkg + "." + file.name[:-3])
64
65
for source in SOURCES:
@@ -147,6 +147,8 @@ def check_file(path):
147
global ok
148
if path.parent == root or any(path.is_relative_to(p) for p in ignored):
149
return
150
+ if path.suffix == ".pyc" or "__pycache__" in path.parts:
151
+ return
152
if path not in managed:
153
print(f"Error: {path} shouldn't exist.")
154
ok = False
0 commit comments