Legacy Python 3.8 mypy rejects datetime search index NumPy array annotations

Aperta
#2,162 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
numpy, python
Ambito
backend

Direzione di ricerca

Start with graphistry/compute/gfql/datetime_search_index.py at lines 194 and 256, then compare the shared ArrayLike and Buffer definitions in graphistry/compute/typing.py. Run the reported Python 3.8 environment command, python -m mypy --config-file mypy.ini graphistry, to reproduce the errors. Done means the legacy type check passes without changing datetime cache behavior or increasing hygiene baselines.

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

Descrizione

Full package type checking on Python/NumPy 3.8.20 1.24.4 with mypy1.14.1 reports two errors in graphistry/compute/gfql/datetime_search_index.py:

  • Line194: the returned NumPy int8 ndarray is rejected as the shared ArrayLike protocol.
  • Line256: memoryview(ndarray) is rejected against Buffer.

Both the helper and graphistry/compute/typing.py are byte-identical at master 97e7f6619480a360d03c1123942aeab293335894 and the current GFQL stack. A separate check of the exact master helper reproduces both errors. These are pre-existing legacy typing failures; no GFQL runtime changes were made for them. Modern mypy2.4.0 checks all358 package files successfully.

Reproduction with an existing Python3.8 environment containing mypy1.14.1 and the repository dependencies:

python -m mypy --config-file mypy.ini graphistry

Resolve the legacy annotation/stub compatibility without changing datetime cache behavior or increasing hygiene baselines. This follow-up is separate from the GFQL indexing/performance stack.

Lingua principale
Python
Stelle
2.6k
Fork
229
Merge medio
1g 5h
PR unite (30g)
99

Preparare l'ambiente

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 graphistry/pygraphistry

Tutte le issue di graphistry/pygraphistry

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.