Skip to content
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

disable_error_code = import-untyped in mypy.ini #142

Closed
wants to merge 2 commits into from

Conversation

Avasam
Copy link
Contributor

@Avasam Avasam commented Aug 22, 2024

@jaraco This is a global solution I suggested to reduce a lot of churn and time-consuming changes left as mentioned in #136 (comment)

Projects that already started doing:

[mypy-*.*]
ignore_missing_imports = True

can keep those entries exactly the way they already are w/o issue.

Projects that have yet to identify their untyped dependencies will see a lot less sudden type errors.

This is directly related to #98 (comment)

mypy.ini Show resolved Hide resolved
mypy.ini Outdated Show resolved Hide resolved
Use imperative voice and orient the comment to describe the setting more directly and give guidance on what to do about it.
@jaraco
Copy link
Owner

jaraco commented Aug 25, 2024

Thanks!

I'm thinking that since some of the projects no longer need this setting, I might merge it to a separate branch and only merge that branch into the projects that are failing. I'm not quite sure how to do that yet.

@jaraco
Copy link
Owner

jaraco commented Aug 25, 2024

I've squash-merged the change to the import-untyped branch. I'm going to see now if I can merge that into some of the failing projects and test the effectiveness.

@jaraco
Copy link
Owner

jaraco commented Aug 25, 2024

  • jaraco.clipboard (passes, fixing one error)
  • jaraco.collections: fixes 1/6 errors
  • jaraco.context: fixes 0/1 errors
  • jaraco.crypto: fixes 0/11 errors

Initial indications are that this helps modestly, but also is going to mask the underlying concern. That is, eventually someone is going to have to come along and disable this setting to find out what is still failing. Granted, one could do that in 2-3 years after presumably some of these upstream packages have supplied the types and thus the root issue is solved. But unless the upstream projects are informed of the need, that may never happen.

Given that this issue is likely only a partial fix, I'm almost more inclined to take more drastic measures like disabling mypy checks for the affected projects. It would be nice if there was a way to turn them into warnings instead of errors, so that the test suite could proceed, and the failures would reported but non-blocking.

@jaraco jaraco mentioned this pull request Aug 25, 2024
53 tasks
@jaraco
Copy link
Owner

jaraco commented Aug 25, 2024

As discussed in #143, we're deferring this change and instead disabling mypy for now.

@jaraco jaraco closed this Aug 25, 2024
jaraco added a commit that referenced this pull request Aug 25, 2024
@Avasam Avasam deleted the patch-3 branch August 25, 2024 17:27
jaraco added a commit that referenced this pull request Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants