Skip to content

Commit

Permalink
Wrap parents in a list to work around bugs in pathlib on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Aug 31, 2024
1 parent 2dd0b6c commit 0481e87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def extra_for(module: pathlib.Path) -> str:
"""
mapping = dict(tests='test', docs='doc')
try:
return f'; extra=="{mapping[str(module.parents[-2])]}"'
return f'; extra=="{mapping[str(list(module.parents)[-2])]}"'
except (KeyError, IndexError):
return ''

Expand Down

0 comments on commit 0481e87

Please sign in to comment.