Skip to content

Conversation

@Avasam
Copy link
Contributor

@Avasam Avasam commented May 4, 2025

No description provided.

Comment on lines +154 to +156
# type-ignore: This makes absolutes os.Pathlike unsupported in this branch.
# Either this or we don't support bytes-based paths, or we complexify this branch.
return os.path.join(new_root, pathname[1:]) # type: ignore[index]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a decision to be taken here.

  1. Don't support PathLike in this branch (current behaviour)
  2. Don't support bytes | PathLike[bytes] in this branch
Suggested change
# type-ignore: This makes absolutes os.Pathlike unsupported in this branch.
# Either this or we don't support bytes-based paths, or we complexify this branch.
return os.path.join(new_root, pathname[1:]) # type: ignore[index]
# type-ignore: This makes absolutes os.Pathlike unsupported in this branch.
# Either this or we don't support bytes-based paths, or we complexify this branch.
return os.path.join(new_root, str(pathname)[1:])
  1. Support both, requires extra checking.

@Avasam Avasam force-pushed the mypy--fix-all-index branch from ee70763 to b045214 Compare May 4, 2025 16:02
@Avasam Avasam force-pushed the mypy--fix-all-index branch from b045214 to a2dfd9c Compare November 2, 2025 16:31
@Avasam Avasam force-pushed the mypy--fix-all-index branch from a2dfd9c to 3309838 Compare November 2, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant