Repository navigation
Fix some types to peewee - #12788
Merged
Merged
Fix some types to peewee#12788
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Collaborator
|
I don't have experience with peewee, but the changes seem correct to me. But mypy seems to have a problem with the same method returning from typing import Self
class Base1:
def foo(self) -> Self:
return self
class Base2:
def foo(self) -> Self:
return self
class Sub(Base1, Base2): # error: Definition of "foo" in base class "Base1" is incompatible with definition in base class "Base2" [misc]
passI'm not sure why that is, but for the moment the best solution is to mark those lines with |
Contributor
Author
|
thank you for your reminder. i will first add |
This reverts commit 5ba70c1.
Contributor
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
srittau
approved these changes
Oct 13, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Among the methods that originally returned
Nonetype, there are some of methods annotated by@Node.copyaccording to the code review, it can be inferred that these methods actually return type
Selfso I fixed these incorrect return type