-
Notifications
You must be signed in to change notification settings - Fork 1
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
[docs] Document linting instructions #32
Comments
Careful it looks like you made a typo, calling it To help with documenting the
where It also fires overlapping errors on the
The workaround, therefore, is to annotate any individual lines using
which confines the messy error suppression to these |
Super helpful, and needing to do that on every line is absolutely abysmal on my part. Proper type annotations using Thanks for, uh, seeing through the thicket of linter errors for the time being. |
Glad I could help! If you end up working it into a larger documentation PR to explain some of the other linter behaviors as well, of course feel free to copy/paste/modify any of the language I used above.
I guess it's a price that I'm willing to pay for using things like I've done a bit of work in appeasing the type checker for funky Pydantic tools myself in (the presently poorly documented) https://github.com/softboiler/context_models and elsewhere, so if you need an extra set of eyes on PRs involving convoluted |
Lovely :):):) I would love a review once I make those changes. And yes a docs pr is due in the meantime |
Hi! I have a project at work where I would love to use numpydantic, but currently the lack of integration with pylance/pyright and ruff block me from making that move. I don't want to stress you out. Just eager to use numpydantic :) Thanks for your open source work! |
working on one time-sensitive project that should be on its feet by the end of this week, and then i need to write a paper on this stuff shortly after, so shouldn't be too long now. I should be able to issue a quick patch that handles at least the need to declare annotations in multiple lines by using literals, and have already scoped out the path to implement it that should be compatible with pydantic and type checkers. |
Until we get 2.0 done and make the shape annotations uh valid type annotations, we need to document how to make it not blow up your linter.
The rule violation is
F22
: https://docs.astral.sh/ruff/rules/forward-annotation-syntax-error/which is a pretty basic one - it's an error that's sort of rare and hard to make, but it's also a rule that is so basic that we shouldn't be violating it (hence 2.0).
Document how to make linters not get annoyed
The text was updated successfully, but these errors were encountered: