Skip to content

Commit 2f92f18

Browse files
committed
chore: clean up minor code smells
This resolves some code smells found during python-poetry/poetry#4773. I have not yet added the new lints to this repo, but I once they're relatively stable/agreed on the main repo I will PR them here.
1 parent ea79142 commit 2f92f18

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

install-poetry.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def _get_win_folder_with_ctypes(csidl_name):
213213

214214
if WINDOWS:
215215
try:
216-
from ctypes import windll # noqa
216+
from ctypes import windll # noqa: F401
217217

218218
_get_win_folder = _get_win_folder_with_ctypes
219219
except ImportError:
@@ -580,7 +580,7 @@ def make_env(self, version: str) -> VirtualEnvironment:
580580
try:
581581
self._install_comment(version, "Creating environment")
582582
yield VirtualEnvironment.make(env_path)
583-
except Exception as e: # noqa
583+
except Exception as e:
584584
if env_path.exists():
585585
self._install_comment(
586586
version, "An error occurred. Removing partial environment."
@@ -871,7 +871,7 @@ def main():
871871
try:
872872
return installer.run()
873873
except PoetryInstallationError as e:
874-
installer._write(colorize("error", "Poetry installation failed.")) # noqa
874+
installer._write(colorize("error", "Poetry installation failed."))
875875

876876
if e.log is not None:
877877
import traceback
@@ -882,7 +882,7 @@ def main():
882882
dir=str(Path.cwd()),
883883
text=True,
884884
)
885-
installer._write(colorize("error", f"See {path} for error logs.")) # noqa
885+
installer._write(colorize("error", f"See {path} for error logs."))
886886
text = f"{e.log}\nTraceback:\n\n{''.join(traceback.format_tb(e.__traceback__))}"
887887
Path(path).write_text(text)
888888

0 commit comments

Comments
 (0)