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

Add mypy excludes for collect_ignore entries

Aperta
#160 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
38/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
testing-qa

Direzione di ricerca

Read the linked conftest.py to understand the collect_ignore entry, then reproduce the mypy-status failure in pytest-mypy using the reported example. Trace how ignored files are selected for mypy and verify that the ignored file is no longer checked while other sources still are.

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

Descrizione

integration

The jaraco.site project has a file in the tree that's ignored for tests.

However, even with that configuration, the file gets collected and is run by mypy and causes tests to fail:

__________________________________________________________________ test session ___________________________________________________________________
mypy exited with status 1.
...
====================================================================== mypy =======================================================================
jaraco/site/projecthoneypot/croakysteel.py:528: error: "Callable[[Any, Any, Any, Any], Any]" has no attribute "getSettings"  [attr-defined]
jaraco/site/projecthoneypot/croakysteel.py:529: error: "Callable[[Any, Any, Any, Any], Any]" has no attribute "makeHTML"  [attr-defined]
jaraco/site/projecthoneypot/croakysteel.py:533: error: "Callable[[Any, Any, Any, Any], Any]" not callable  [operator]
Found 3 errors in 1 file (checked 11 source files)
============================================================= short test summary info =============================================================
FAILED conftest.py::mypy-status
============================================== 1 failed, 25 passed, 10 skipped, 3 warnings in 5.09s ===============================================
py: exit 1 (5.43 seconds) /Users/jaraco/code/jaraco/jaraco.site> pytest pid=33733

Is there a way that pytest-mypy can honor collect_ignore?

Lingua principale
Python
Stelle
257
Fork
33
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

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 realpython/pytest-mypy

Tutte le issue di realpython/pytest-mypy

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.