Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/click/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,12 @@ def convert(
) -> str | bytes | os.PathLike[str]:
rv = value

is_dash = self.file_okay and self.allow_dash and rv in (b"-", "-")
is_dash = (
self.file_okay
and self.allow_dash
and isinstance(rv, (bytes, str))
and rv in (b"-", "-")
)

if not is_dash:
if self.resolve_path:
Expand Down