-
Notifications
You must be signed in to change notification settings - Fork 27
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
chore: pass repo review #219
Conversation
Codecov Report
@@ Coverage Diff @@
## main #219 +/- ##
=======================================
Coverage 82.56% 82.56%
=======================================
Files 96 96
Lines 10475 10475
=======================================
Hits 8649 8649
Misses 1826 1826
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR grew bigger than I thought. Most of the changes are due to the updated pre-commit
configuration, but there are a few changes which I think should be reviewed once. I have marked them down below. @henryiii @jpivarski could you please review them once? Thanks!
if issubclass(cls, Vector2D): # type: ignore[unreachable] | ||
return "Momentum2D" # type: ignore[unreachable] | ||
elif issubclass(cls, Vector3D): # type: ignore[unreachable] | ||
return "Momentum3D" # type: ignore[unreachable] | ||
elif issubclass(cls, Vector4D): # type: ignore[unreachable] | ||
return "Momentum4D" # type: ignore[unreachable] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type: ignore[unreachable]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guessing it is not understanding that Type[VectorProtocol]
can (sometimes) pass a subclass of Momentum
check? Might be worth updating that. But not in this PR, these are (all) fine for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The exact error -
src\vector\backends\awkward.py:577: error: Subclass of "VectorProtocol", "Momentum", and "Vector2D" cannot exist: would have inconsistent method resolution order [unreachable]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay to ignore for now, we can try to work on it later. We will probably need to think through why this is happening. Eventually.
if issubclass(cls, Vector2D): # type: ignore[unreachable] | ||
return "Momentum2D" # type: ignore[unreachable] | ||
elif issubclass(cls, Vector3D): # type: ignore[unreachable] | ||
return "Momentum3D" # type: ignore[unreachable] | ||
elif issubclass(cls, Vector4D): # type: ignore[unreachable] | ||
return "Momentum4D" # type: ignore[unreachable] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guessing it is not understanding that Type[VectorProtocol]
can (sometimes) pass a subclass of Momentum
check? Might be worth updating that. But not in this PR, these are (all) fine for now.
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
setup.cfg
,.pre-commit-config.yaml
, andpyproject.toml
to pass the repo reviewnoxfile.py
for beginnersRepo review for this branch - https://scikit-hep.org/repo-review/?repo=Saransh-cpp%2Fvector&branch=saransh%2Frepo-review
(The red cross should ideally not appear since the dependabot check was fixed in the repo review repository. All the other green ticks are very satisfying to look at!)