Skip to content

Commit

Permalink
mypy: fix "unused type ignore" issue on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
radoering committed Apr 30, 2022
1 parent 6721ebe commit 4eb7c98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/poetry/utils/appdirs.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ def _get_win_folder_with_ctypes(csidl_name: str) -> str:
}[csidl_name]

buf = ctypes.create_unicode_buffer(1024)
windll = ctypes.windll # type: ignore[attr-defined]
assert sys.platform == "win32" # for mypy
windll = ctypes.windll
windll.shell32.SHGetFolderPathW(None, csidl_const, None, 0, buf)

# Downgrade to short path name if have highbit chars. See
Expand Down

0 comments on commit 4eb7c98

Please sign in to comment.