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
Add a regression test for #15979, and fix linecount-report for Windows (#20111)
#16019, which fixed this issue (for
linux) was not accompanied by a regression test. Thus, nobody noticed
that it doesn't work on Windows!
This fixes an Internal Error where namespace packages were not supported
properly. This fix was inspired by @sterliakov noticing that
#18128 was very similar to #19843,
which has a similar fix. Note that we use `os.path.isdir(tree.path)`
instead of trying to catch an `IsADirectoryError` exception because of a
bug on Windows which causes it to throw a `PermissionError` instead in
[the relevant
situation](https://discuss.python.org/t/permissionerror-errno-13-permission-denied-python-2023/22360/8),
which makes `except IsADirectoryError` unreliable. (We also can't just
`except (IsADirectoryError, PermissionError)` because what if there is
an actual permission error?)
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ivan Levkivskyi <[email protected]>
0 commit comments