Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand type definition for filename #1849

Merged
merged 2 commits into from
Feb 12, 2024
Merged

Expand type definition for filename #1849

merged 2 commits into from
Feb 12, 2024

Conversation

alexrudd2
Copy link
Contributor

FileHistory.filename is currently hinted as str.

It is used by open() and os.path.exists(). os.path.exists() supports os.PathLike since 3.6

Therefore, the type hint should be expanded to Union[str, os.PathLike].

@jonathanslenders
Copy link
Member

Thanks!

@jonathanslenders jonathanslenders merged commit fe38e71 into prompt-toolkit:master Feb 12, 2024
1 of 6 checks passed
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.

2 participants