-
-
Notifications
You must be signed in to change notification settings - Fork 824
👷 Add ty to the CI lint check
#1477
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
base: master
Are you sure you want to change the base?
Conversation
📝 Docs previewLast commit 5a7bf84 at: https://3cf779e6.typertiangolo.pages.dev |
| return inspect.cleandoc(typer_info.help or "") | ||
| # Priority 2: Explicit value was set in sub_app.callback() | ||
| try: | ||
| if typer_info.typer_instance and typer_info.typer_instance.registered_callback: |
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 edit and the lines below is not strictly necessary: they are "possibly-missing-attribute" warnings from ty that won't fail the CI. Still, IMO it's nice to test for this explicitely up-front instead of having the try-catch. This is a bit of personal preference though, so will leave it to Tiangolo to make the final decision.
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.
Instead of making these edits, we have two other options:
- add
ty: ignorestatements - just leave the warnings as is (though this is somewhat annoying when running the tool locally and getting all the warnings output)
|
Ok this is ready for review @tiangolo. TLDR decisions to take:
|
For now, running
tyin parallel tomypyto see what kind of errors/warnings come up.