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

Fix TreeMaker Protocol, removing almost all # type: ignore #4

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

Avasam
Copy link
Contributor

@Avasam Avasam commented Aug 22, 2024

Neither pathlib.Path not Recording were valid TreeMaker protocols.
object return type is so that any return type will match. It essentially means the return value is unused. (_typeshed.Unused can be used for that semantic if you'd prefer over a bare object)

# pragma: no cover removed because single line ... are excluded by coverage by default and our configs exclude Protocols

No piece of code validated that Recording was a valid TreeMaker statically. As long as mypy runs on tests this is now validated.

The last # type: ignore left is caused by singledispatch. It's fixable using a "dummy" main method. But I figured you'd prefer staying concise with a suppression comment (it would also be out of scope of this PR to change that)

Relates to jaraco/skeleton#143

@Avasam Avasam force-pushed the Fix-TreeMaker-Protocol branch 3 times, most recently from 59d5934 to 97f182f Compare August 22, 2024 21:06
@jaraco jaraco merged commit ba562cc into jaraco:main Aug 29, 2024
14 checks passed
@Avasam Avasam deleted the Fix-TreeMaker-Protocol branch August 29, 2024 15:50
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