-
Notifications
You must be signed in to change notification settings - Fork 675
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
Changing mypy to pyright #4425
base: main
Are you sure you want to change the base?
Changing mypy to pyright #4425
Conversation
|
@@ -60,6 +60,11 @@ You can run `tox` with the following arguments: | |||
- `tox -e lint-some-package` to run lint checks on `some-package` | |||
- `tox -e generate-workflows` to run creation of new CI workflows if tox environments have been updated | |||
- `tox -e ruff` to run ruff linter and formatter checks against the entire codebase | |||
- `tox -e pyright` to run pyright against entire code base. |
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.
There were a few targets that were mentioned so I added them.
mypy-relaxed.ini
Outdated
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.
deleted these because the plan is to move away from mypy
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.
You need to get CLA signed to get things merged, so please take a look at the CLA error
] | ||
reportUnnecessaryTypeIgnoreComment = true | ||
pythonVersion = "3.9" | ||
reportPrivateUsage = false # Ignore private attributes added by instrumentation packages. |
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 is unfortunate. In terms of typing, what opentelemetry does is wrong... It would be more useful to have a concrete example to discuss here.
"exporter/**", | ||
"propagator/**", | ||
"shim/**", | ||
|
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.
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.
Revert changes here, please.
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.
Can I ask why we wouldn't want to use this version?
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.
Oh I see what you mean, Delete this file and add it to dev requirements, right?
pyright-requirements.txt
Outdated
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.
Can't we just add this to the dev-requirements? 🤔
"shim/**", | ||
|
||
] | ||
reportUnnecessaryTypeIgnoreComment = 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.
We should actually talk about all the config settings that aren't set for strict:
https://github.com/microsoft/pyright/blob/main/docs/configuration.md#:~:text=%22error%22-,reportCallInDefaultInitializer,-%22none%22
Maybe there are some that would be useful,
There are 10 of them.
Description
This change can be documented here:
#4404
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Does This PR Require a Contrib Repo Change?
Checklist: