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
Traceback (most recent call last):
File "/Users/pgorniak/.pyenv/versions/3.8.13/bin/isort", line 8, in <module>
sys.exit(main())
File "/Users/pgorniak/.pyenv/versions/3.8.13/lib/python3.8/site-packages/isort/main.py", line 1110, in main
config = Config(**config_dict)
File "/Users/pgorniak/.pyenv/versions/3.8.13/lib/python3.8/site-packages/isort/settings.py", line 470, in __init__
for path in full_paths:
File "/Users/pgorniak/.pyenv/versions/3.8.13/lib/python3.8/pathlib.py", line 1136, in glob
drv, root, pattern_parts = self._flavour.parse_parts((pattern,))
File "/Users/pgorniak/.pyenv/versions/3.8.13/lib/python3.8/pathlib.py", line 75, in parse_parts
drv, root, rel = self.splitroot(part)
File "/Users/pgorniak/.pyenv/versions/3.8.13/lib/python3.8/pathlib.py", line 294, in splitroot
if part and part[0] == sep:
TypeError: 'PosixPath' object is not subscriptable
If run via isort . but with a config file entry like
[settings]
src_paths=*/src/
the pattern works fine because the src_paths entry doesn't exist yet at the line above and is only read from the config file later, meaning it remains a string and the glob works fine.
The text was updated successfully, but these errors were encountered:
Running
isort --src '*/src/' .
results inI think because paths are resolved first using pathlib at https://github.com/PyCQA/isort/blob/main/isort/main.py#L1117.
If run via
isort .
but with a config file entry likethe pattern works fine because the
src_paths
entry doesn't exist yet at the line above and is only read from the config file later, meaning it remains a string and the glob works fine.The text was updated successfully, but these errors were encountered: