-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: add type annotations #23
Conversation
Test failure is from the pre-commit pyright being out of date. This passes when pyright is updated! |
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.
LGTM!
@@ -38,7 +38,6 @@ addopts = "--jaxtyping-packages=quax,beartype.beartype(conf=beartype.BeartypeCon | |||
[tool.ruff.lint] | |||
select = ["E", "F", "I001"] | |||
ignore = ["E402", "E721", "E731", "E741", "F722"] | |||
ignore-init-module-imports = true |
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.
Why remove this?
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.
Newer ruff
doesn't require it. It surfaces a warning saying that it's being deprecated.
Update pyright in this MR as well? :) |
I actually don't know how pre-commit is selecting the |
The version is specified in I guess I'd spin that around, why use an external service for something that is already simple enough to do manually? |
Oops, duh. I git-exclude my pre-commit-configs once I lock in the set of hooks so that I never think about it and let pre-commit.ci wholly manage upgrading the hooks. So it wasn't showing being changed in this PR for
Personally I (and astropy) do it for
|
Signed-off-by: nstarman <[email protected]>
Oh, the autofixing PRs is quite nice. Indeed sometimes we do find new contributors who haven't used pre-commit locally. (Although in my experience pretty much everyone uses pre-commit, so this doesn't come up super frequently.) Anyway, merged! This PR looks good to me. If this now has everything you want I'm happy to do a new versioned release as well. (Or a little later if you find there's some other tweaks still needed.) |
From testing v0.0.4 I found that there are some missing type annotations. This PR adds type annotations to
quaxify
, makes_Quaxify
generic wrt the function, and adds a few miscellaneous types.