Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Pylint hangs when running on a module that has type annotations from returns

Aperta
#792 8 commenti 4 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
tooling

Direzione di ricerca

Reproduce the hang with the supplied test.py example and the listed Python, pylint, astroid, and returns versions. Start by tracing the astroid.decorators.raise_if_nothing_inferred generator while running pylint, then inspect the surrounding type-inference path. Done means pylint completes on the example without hanging and a regression test covers it.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I've noticed pylint is hanging (vscode's python plugin started to consume 100% CPU) when trying to lint a module that has type annotations from returns library.

Consider the following test.py:

from returns.maybe import Maybe, Some

x: Maybe[int] = Some(1)

Running pylint test.py will hang forever.

Not sure if the problem is with returns or pylint itself (or maybe something with my local setup, tried both with my regular pylint config and without it though). Didn't spend much time debugging it, but sometimes I noticed it hangs in astroid.decorators.raise_if_nothing_inferred generator. Does anyone experience the same?

python: 3.7.9, 3.9.0
pylint: 2.6.0
astroid: 2.4.2
returns: 0.15.0
Lingua principale
Python
Stelle
4.4k
Fork
154
Merge medio
3h 5m
PR unite (30g)
22

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di dry-python/returns

Tutte le issue di dry-python/returns

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.