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

Widespread mypy failures #143

Closed
4 of 53 tasks
jaraco opened this issue Aug 25, 2024 · 5 comments
Closed
4 of 53 tasks

Widespread mypy failures #143

jaraco opened this issue Aug 25, 2024 · 5 comments

Comments

@jaraco
Copy link
Owner

jaraco commented Aug 25, 2024

As mentioned in #136 (comment) and #142 (comment), I'm trying to figure out a strategy for incorporating stricter settings for mypy without incurring too much toil.

Right now, about half of the projects are failing:

image

  • jaraco.collections
  • jaraco.compat
  • jaraco.context
  • jaraco.crypto
  • jaraco.desktop
  • jaraco.email
  • jaraco.fabric
  • jaraco.financial
  • jaraco.functools
  • jaraco.home
  • jaraco.imaging
  • jaraco.input
  • jaraco.logging
  • jaraco.media
  • jaraco.modb
  • jaraco.mongodb
  • jaraco.net
  • jaraco.nxt
  • jaraco.office
  • jaraco.parables
  • jaraco.pmxbot
  • jaraco.postgres
  • jaraco.services
  • jaraco.site
  • jaraco.test
  • jaraco.text
  • jaraco.tidelift
  • jaraco.translate
  • jaraco.ui
  • jaraco.util
  • jaraco.vcs
  • jaraco.windows
  • jaraco.xkcd
  • keyrings.alt
  • keyrings.firefox
  • lpaste
  • nat-pmp
  • nspektr
  • openpack
  • paradocx
  • path
  • pip-run
  • pmxbot.webhooks
  • pytest-checkdocs
  • pytest-enabler
  • pytest-perf
  • recapturedocs
  • rst.linker
  • singledispatch
  • svg.charts
  • tempora
  • treehouse
  • xlsxcessive
@jaraco
Copy link
Owner Author

jaraco commented Aug 25, 2024

I was hoping there might be a way to treat failures as warnings, but I couldn't find such a feature, so I filed realpython/pytest-mypy#177. In the meantime, I think we should disable mypy checks until these issues can be addressed.

jaraco added a commit that referenced this issue Aug 25, 2024
@jaraco
Copy link
Owner Author

jaraco commented Aug 25, 2024

I've rolled out d3e83be to all the projects. Let's see if that clears some things up. In the meantime, I welcome anyone to help out submitting PRs to the individual projects above such that tox -- --mypy passes.

@Avasam
Copy link
Contributor

Avasam commented Aug 25, 2024

I was hoping there might be a way to treat failures as warnings, but I couldn't find such a feature, so I filed realpython/pytest-mypy#177. In the meantime, I think we should disable mypy checks until these issues can be addressed.

mypy warnings would be nice, and probably the best solution.

@Avasam
Copy link
Contributor

Avasam commented Aug 28, 2024

And done !
I fixed them all in the best way I could (not just blindly adding/removing suppression comments).
Some were so close to being complete already I just completed them.

@jaraco
Copy link
Owner Author

jaraco commented Aug 28, 2024

Wow. Amazing! Thank you!

@jaraco jaraco closed this as completed Aug 28, 2024
clrpackages pushed a commit to clearlinux-pkgs/pypi-jaraco.collections that referenced this issue Aug 30, 2024
…0.1 to version 5.1.0

Anderson Bravalheri (1):
      Add `--fix`  flag to ruff pre-commit hook for automatic suggestion of fixes (jaraco/skeleton#140)

Avasam (4):
      Add Protocols, remove @overload, from `.coveragerc` `exclude_also` (jaraco/skeleton#135)
      Loosen restrictions on mypy (jaraco/skeleton#136)
      Pass mypy and link issues
      Fully typed `RangeMap` and avoid complete iterations to find matches (#16)

Bartosz Sławecki (1):
      Move project metadata to `pyproject.toml` (jaraco/skeleton#122)

Dimitri Papadopoulos Orfanos (3):
      "preserve" does not require preview any more (jaraco/skeleton#133)
      Enforce ruff/Perflint rule PERF401 (jaraco/skeleton#132)
      Update to the latest ruff version (jaraco/skeleton#137)

Jason R. Coombs (14):
      Pin against pytest 8.1.x due to pytest-dev/pytest#12194.
      Migrated config to pyproject.toml using jaraco.develop.migrate-config and ini2toml.
      Allow macos on Python 3.8 to fail as GitHub CI has dropped support.
      Move project.urls to appear in the order that ini2toml generates it. Remove project.scripts.
      Revert "Allow macos on Python 3.8 to fail as GitHub CI has dropped support."
      Rename extras to align with core metadata spec.
      Prefer "Source" to "Homepage" for the repository label.
      Exclude pytest-ruff (and thus ruff), which cannot build on cygwin.
      Re-enable preview, this time not for one specific feature, but for all features in preview.
      Split the test dependencies into four classes (test, cover, type, check). (jaraco/skeleton#139)
      Add upstream and local sections for 'type' extra, since many projects will have 'types-*' dependencies.
      Disable mypy for now. Ref jaraco/skeleton#143
      Finalize
      Remove unsupported attribution. See jaraco/skeleton#144.
clrpackages pushed a commit to clearlinux-pkgs/pypi-zipp that referenced this issue Aug 30, 2024
…n 3.20.1

Anderson Bravalheri (1):
      Add `--fix`  flag to ruff pre-commit hook for automatic suggestion of fixes (jaraco/skeleton#140)

Avasam (2):
      Add Protocols, remove @overload, from `.coveragerc` `exclude_also` (jaraco/skeleton#135)
      Loosen restrictions on mypy (jaraco/skeleton#136)

Dimitri Papadopoulos Orfanos (1):
      Update to the latest ruff version (jaraco/skeleton#137)

Jason R. Coombs (19):
      Uncomment link to the docs.
      Split the test dependencies into four classes (test, cover, type, check). (jaraco/skeleton#139)
      Add upstream and local sections for 'type' extra, since many projects will have 'types-*' dependencies.
      🧎‍♀️ Genuflect to the types.
      🧎‍♀️ Genuflect to the types.
      🧎‍♀️ Genuflect to the types.
      Add reference to development methodology.
      Disable mypy for now. Ref jaraco/skeleton#143
      Add two tests capturing the expectation for unsupported names.
      Adjust the expectation in test_malformed_paths to expect empty paths ignored and .. to be a path segment.
      Removed SanitizedNames.
      Address infinite loop when zipfile begins with more than one leading slash.
      Refine expectation that paths with leading slashes are simply not visible.
      Invent DirtyZipInfo to create an unsanitized zipfile with backslashes.
      Add news fragment.
      Mark unused code as uncovered.
      Prefer simpler path.rstrip to consolidate checks for empty or only paths.
      Add TODO to consolidate this behavior in CPython.
      Finalize
clrpackages pushed a commit to clearlinux-pkgs/pypi-setuptools that referenced this issue Aug 30, 2024
…version 74.0.0

Anderson Bravalheri (11):
      Remove outdated import error check for warnings
      Satisfy ruff import format
      Add `--fix`  flag to ruff pre-commit hook for automatic suggestion of fixes (jaraco/skeleton#140)
      Remove unnecessary conditional on TYPE_CHECKING
      Test setuptools own sdist does not include tox files
      Prune .tox directory
      Remove custom manifest_maker.prune_file_list and rely on default implementation in sdist
      Automatically exclude top-level .tox|.nox|.ven from sdist
      Test against false positve matches
      Account for windows path separators in tests
      Add missing news fragment for PR 4603

Avasam (18):
      Add Protocols, remove @overload, from `.coveragerc` `exclude_also` (jaraco/skeleton#135)
      Loosen restrictions on mypy (jaraco/skeleton#136)
      Raise `TypeError` in `easy_install.CommandSpec.from_param`
      Type-check on all Python versions
      Pin Ruff to a lower bound rather than pinning pytest-ruff to an upper-bound
      Move static-checkers-only dependencies into their dedicated extras
      Avoid issues with  _build_ext being Any (#4599)
      `pkg_resources`: use `_typeshed.importlib.LoaderProtocol` (#4597)
      Make get_ext_filename typesafe (#4592)
      `pkg_resources` fully type all collection attributes (#4598)
      Made setuptools.package_index.Credential a NamedTuple (#4585)
      Initial pyright config (#4192)
      Type str/repr dunders (#4582)
      Type all get/set dunders
      Type all comparison/operators dunders (#4583)
      Type context manager dunders (#4581)
      Link to issues in mypy.ini for non py.typed dependencies (#4561)
      Reraise sensible errors from auto_chmod

Cal Jacobson (3):
      handle failures to find a user home directory
      Update distutils/dist.py
      format

Chris Barker (1):
      change VERSION to __version__ in the example (#4590)

Christoph Reiter (1):
      Remove unused wininst-*.exe files

Dimitri Papadopoulos (9):
      Apply ruff/tryceratops rule TRY300
      Apply ruff/tryceratops rule TRY301
      Enforce ruff/tryceratops rules (TRY)
      Enforce ruff/flake8-2020 rule (YTT301)
      Apply ruff/Perflint rule PERF102
      Apply ruff/Perflint rule PERF402
      Apply ruff/Perflint rule PERF403
      Enforce ruff/Perflint rules (PERF)
      Add `# local` to ignore conflicts with upstrea

Dimitri Papadopoulos Orfanos (1):
      Update to the latest ruff version (jaraco/skeleton#137)

Jason R. Coombs (17):
      Split the test dependencies into four classes (test, cover, type, check). (jaraco/skeleton#139)
      Add upstream and local sections for 'type' extra, since many projects will have 'types-*' dependencies.
      Disable mypy for now. Ref jaraco/skeleton#143
      Simply suppress the exception.
      Sort imports
      Define the variable in one place.
      Extract logic around the mappings into a function to compute the spec.
      Tweak docstring
      Remove legacy msvc compiler modules.
      Remove associated tests
      Remove monkeypatching of _msvccompiler.
      Remove associated tests
      Apply downstream VS 2017 support.
      Apply error message from downstream.
      Add news fragment.
      Add news fragment.
      Bump version: 73.0.1 → 74.0.0

Kagami Sascha Rosylight (8):
      Use arm64 MSVC on arm64 Windows
      Check MSVC arm64 variant on arm64 host (#4555)
      conditionally construct PLAT_TO_VCVARS
      function-ify
      nit
      python supports comparison chains
      apply feedback
      restore the lost comment
clrpackages pushed a commit to clearlinux-pkgs/pypi-inflect that referenced this issue Sep 10, 2024
…ion 7.4.0

Anderson Bravalheri (1):
      Add `--fix`  flag to ruff pre-commit hook for automatic suggestion of fixes (jaraco/skeleton#140)

Avasam (2):
      Add Protocols, remove @overload, from `.coveragerc` `exclude_also` (jaraco/skeleton#135)
      Loosen restrictions on mypy (jaraco/skeleton#136)

Dimitri Papadopoulos Orfanos (3):
      "preserve" does not require preview any more (jaraco/skeleton#133)
      Enforce ruff/Perflint rule PERF401 (jaraco/skeleton#132)
      Update to the latest ruff version (jaraco/skeleton#137)

Jason R. Coombs (14):
      Exclude pytest-ruff (and thus ruff), which cannot build on cygwin.
      Re-enable preview, this time not for one specific feature, but for all features in preview.
      Split the test dependencies into four classes (test, cover, type, check). (jaraco/skeleton#139)
      Add upstream and local sections for 'type' extra, since many projects will have 'types-*' dependencies.
      🧎‍♀️ Genuflect to the types.
      Move comment
      Construct the _gend_sing dictionary statically.
      Disable mypy for now. Ref jaraco/skeleton#143
      Move overload-overlap disablement to its own line for easier diffs and simpler relevant comments.
      Add a degenerate nitpick_ignore for downstream consumers. Add a 'local' comment to delineate where the skeleton ends and the downstream begins.
      Add support for linking usernames.
      Include the trailing slash in disable_error_code(overload-overlap), also required for clean diffs.
      Add news fragment.
      Finalize

Josh Stephenson (1):
      Clarify that inflect is for English.

Mitchel Humpherys (2):
      Handle a single apostrophe more gracefully
      Add a test for a single-character apostrophe string
clrpackages pushed a commit to clearlinux-pkgs/pypi-importlib_resources that referenced this issue Sep 10, 2024
….4.4 to version 6.4.5

Anderson Bravalheri (1):
      Add `--fix`  flag to ruff pre-commit hook for automatic suggestion of fixes (jaraco/skeleton#140)

Jason R. Coombs (11):
      Add reference to development methodology.
      Disable mypy for now. Ref jaraco/skeleton#143
      Move overload-overlap disablement to its own line for easier diffs and simpler relevant comments.
      Add a degenerate nitpick_ignore for downstream consumers. Add a 'local' comment to delineate where the skeleton ends and the downstream begins.
      Add support for linking usernames.
      Include the trailing slash in disable_error_code(overload-overlap), also required for clean diffs.
      Fix typo in _temp_path comment.
      Add type annotations for _candidate_paths
      Add test capturing failure when resolving the MultiplexedPath for a namespace package with non-path elements in the path.
      Omit sentinel values from a namespace path.
      Finalize
clrpackages pushed a commit to clearlinux-pkgs/pypi-importlib_metadata that referenced this issue Sep 16, 2024
…4.0 to version 8.5.0

Anderson Bravalheri (1):
      Add `--fix`  flag to ruff pre-commit hook for automatic suggestion of fixes (jaraco/skeleton#140)

Avasam (4):
      Add Protocols, remove @overload, from `.coveragerc` `exclude_also` (jaraco/skeleton#135)
      Loosen restrictions on mypy (jaraco/skeleton#136)
      Pass mypy and link issues
      Update tests/_path.py with jaraco.path 3.7.2

Daniel Hollas (3):
      Defer import of zipp
      Defer json import
      Defer platform import

Dimitri Papadopoulos Orfanos (1):
      Update to the latest ruff version (jaraco/skeleton#137)

Jason R. Coombs (24):
      Split the test dependencies into four classes (test, cover, type, check). (jaraco/skeleton#139)
      👹 Feed the hobgoblins (delint).
      Remove superfluous parentheses.
      Rely on zipp overlay for zipfile.Path.
      Add upstream and local sections for 'type' extra, since many projects will have 'types-*' dependencies.
      🧎‍♀️ Genuflect to the types.
      🧎‍♀️ Genuflect to the types.
      🧎‍♀️ Genuflect to the types.
      🧎‍♀️ Genuflect to the types.
      🧎‍♀️ Genuflect to the types.
      🧎‍♀️ Genuflect to the types.
      Add reference to development methodology.
      Disable mypy for now. Ref jaraco/skeleton#143
      Move overload-overlap disablement to its own line for easier diffs and simpler relevant comments.
      Add a degenerate nitpick_ignore for downstream consumers. Add a 'local' comment to delineate where the skeleton ends and the downstream begins.
      Add support for linking usernames.
      Include the trailing slash in disable_error_code(overload-overlap), also required for clean diffs.
      Add comment to protect the deferred import.
      Add news fragment.
      Revert "Defer platform import"
      Add comment to protect the deferred import.
      Add news fragment.
      Back out changes to tests._path
      Finalize
clrpackages pushed a commit to clearlinux-pkgs/pypi-keyring that referenced this issue Sep 19, 2024
…sion 25.4.0

Anderson Bravalheri (1):
      Add `--fix`  flag to ruff pre-commit hook for automatic suggestion of fixes (jaraco/skeleton#140)

Avasam (4):
      Add Protocols, remove @overload, from `.coveragerc` `exclude_also` (jaraco/skeleton#135)
      Loosen restrictions on mypy (jaraco/skeleton#136)
      Re-enable mypy and add libraries to type checking
      Fix an incompatibility (and source of merge conflicts) with projects using Ruff/isort.

David Hotham (1):
      add a couple of type annotations

Dimitri Papadopoulos Orfanos (1):
      Update to the latest ruff version (jaraco/skeleton#137)

Jason R. Coombs (16):
      Split the test dependencies into four classes (test, cover, type, check). (jaraco/skeleton#139)
      Add upstream and local sections for 'type' extra, since many projects will have 'types-*' dependencies.
      🧎‍♀️ Genuflect to the types.
      🧎‍♀️ Genuflect to the types.
      Restrict SimpleCredential to require a password.
      Introduce AnonymousCredential to support the use-case of a secret without a username.
      Add news fragment.
      Disable mypy for now. Ref jaraco/skeleton#143
      Move overload-overlap disablement to its own line for easier diffs and simpler relevant comments.
      Add a degenerate nitpick_ignore for downstream consumers. Add a 'local' comment to delineate where the skeleton ends and the downstream begins.
      Add support for linking usernames.
      Include the trailing slash in disable_error_code(overload-overlap), also required for clean diffs.
      Remove workaround for sphinx-contrib/sphinx-lint#83
      Allow the workflow to be triggered manually.
      Add Python 3.13 and 3.14 into the matrix. (jaraco/skeleton#146)
      Finalize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants