Skip to content

Make pyright run in standard mode #4425

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

Merged
merged 15 commits into from
Mar 12, 2025

Conversation

pierceroberts
Copy link
Contributor

@pierceroberts pierceroberts commented Feb 13, 2025

Description

Partially address:
#4404

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

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

  • Run pre-commit with out issues
  • python -m pyright runs successfully
  • python -m mypy does not run.

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

Copy link

linux-foundation-easycla bot commented Feb 13, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@pierceroberts
Copy link
Contributor Author

@emdneto and @Kludex for visibility. Still a few things to iron out. Feel free to comment as I go.

Copy link
Member

@emdneto emdneto left a 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

@pierceroberts pierceroberts marked this pull request as ready for review February 19, 2025 17:09
@pierceroberts pierceroberts requested a review from a team as a code owner February 19, 2025 17:09
@pierceroberts pierceroberts requested a review from emdneto March 7, 2025 05:10
Copy link
Member

@aabmass aabmass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

Copy link
Member

@emdneto emdneto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The thing is, in strict mode, there are a lot of fixes to do even for opentelemetry-api (124 errors, 0 warnings, 0 informations) which is already fine according to mypy setup. so I'm thinking on the following plan:

  1. Keep mypy in CI for a while
  2. Add pyright in standard mode, with a strict list (this PR)
  3. Fix typing issues from the exclude list in follow-up small PRs
  4. When the fix list for at least opentelemetry-api and opentelemetry-sdk/resources is done, we remove mypy from CI.

I did some changes to help this get in.

Signed-off-by: emdneto <[email protected]>
@emdneto emdneto changed the title Changing mypy to pyright Make pyright run in standard mode Mar 8, 2025
Copy link
Member

@aabmass aabmass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds a like a plan, thanks!

@emdneto emdneto added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Mar 10, 2025
@emdneto
Copy link
Member

emdneto commented Mar 11, 2025

@pierceroberts can you create a tracking issue with the typing issues we are ignoring here so we can fix them later?

  1. Fix typing issues from the exclude list in follow-up small PRs

@aabmass aabmass enabled auto-merge (squash) March 11, 2025 22:22
@pierceroberts
Copy link
Contributor Author

@pierceroberts can you create a tracking issue with the typing issues we are ignoring here so we can fix them later?

  1. Fix typing issues from the exclude list in follow-up small PRs

@emdneto I created this tracking issue: #4479

@aabmass aabmass merged commit 7acbfb4 into open-telemetry:main Mar 12, 2025
385 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants