Skip to content

Commit

Permalink
Ensure has_trailing_sep is boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
barneygale committed Dec 4, 2023
1 parent af12c24 commit cae3774
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def _parse_path(cls, path):
# e.g. //?/unc/server/share
root = sep
parsed = [sys.intern(str(x)) for x in rel.split(sep) if x and x != '.']
has_trailing_sep = parsed and not rel.endswith(parsed[-1])
has_trailing_sep = bool(parsed) and not rel.endswith(parsed[-1])
return drv, root, parsed, has_trailing_sep

def _load_parts(self):
Expand Down

0 comments on commit cae3774

Please sign in to comment.