Skip to content

fix: Path.cwd() is missing a return type annotation#245

Closed
JiwaniZakir wants to merge 1 commit intojaraco:mainfrom
JiwaniZakir:fix/issue-243
Closed

fix: Path.cwd() is missing a return type annotation#245
JiwaniZakir wants to merge 1 commit intojaraco:mainfrom
JiwaniZakir:fix/issue-243

Conversation

@JiwaniZakir
Copy link

Fixes #243

Path.cwd() in path/__init__.py lacked a return type annotation, leaving type checkers unable to infer the return type. The root cause was a missing -> 'Path' annotation on the classmethod definition. Adds the annotation to Path.cwd() in path/__init__.py, using a forward reference string 'Path' consistent with the class's own type. Verified by running the module and confirming Path.cwd() returns a Path instance without errors.

@purplezimmermann
Copy link

Duplicate of #244

@JiwaniZakir
Copy link
Author

Good catch @purplezimmermann — closing in favour of #244.

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.

Path.cwd() is missing a return type annotation

2 participants