Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Error importing plugin "classes.contrib.mypy.classes_plugin" cannot import name 'union_items' from 'mypy.types'

Offen
#481 5 Kommentare 4 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
tooling

Rechercherichtung

Beginnen Sie damit, den Python-3.11-Import aus dem Issue zu reproduzieren, und untersuchen Sie classes/contrib/mypy/typeops/call_signatures.py, wo der Traceback den fehlschlagenden mypy.types-Import zeigt. Prüfen Sie die installierte mypy-Kompatibilität und verifizieren Sie, dass der Import von classes.contrib.mypy.classes_plugin ohne Fehler abgeschlossen wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug

Bug report

What's wrong

I am hitting the error on a clean installation with python3.11 on MacOS.

Python 3.11.1 (main, Dec 12 2022, 14:17:59) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import classes.contrib.mypy.classes_plugin
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/uname/PycharmProjects/sandbox/.venv/lib/python3.11/site-packages/classes/contrib/mypy/classes_plugin.py", line 33, in <module>
    from classes.contrib.mypy.features import associated_type, supports, typeclass
  File "/Users/uname/PycharmProjects/sandbox/.venv/lib/python3.11/site-packages/classes/contrib/mypy/features/typeclass.py", line 17, in <module>
    from classes.contrib.mypy.typeops import (
  File "/Users/uname/PycharmProjects/sandbox/.venv/lib/python3.11/site-packages/classes/contrib/mypy/typeops/call_signatures.py", line 9, in <module>
    from mypy.types import TypeVarType, union_items
ImportError: cannot import name 'union_items' from 'mypy.types' (/Users/uname/PycharmProjects/sandbox/.venv/lib/python3.11/site-packages/mypy/types.cpython-311-darwin.so)

How is that should be

No errors

System information

  • python version:
  • classes version:
  • mypy version:
Vorherrschende Sprache
Python
Sterne
730
Forks
30
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus dry-python/classes

Alle Issues in dry-python/classes

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.