QuantEcon / QuantEcon/lecture-python-intro

laffer_adaptive: `import matplotlib` is unused (missed by #798)

Aperta Adatta ai principianti
#800 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Jupyter Notebook
Stelle
65
Fork
32
Merge medio
4g 14h
PR unite (30g)
6

Descrizione

lectures/laffer_adaptive.md imports matplotlib but never uses it. The only matplotlib-prefixed reference in the lecture is the matplotlib.pyplot and matplotlib.ticker imports themselves — nothing calls matplotlib.<anything>.

The import block currently reads:

line import used?
170 from collections import namedtuple yes
171 import numpy as np yes
172 import matplotlib.pyplot as plt yes
173 from matplotlib.ticker import MaxNLocator yes
174 import matplotlib no
175 from scipy.optimize import root, fsolve yes

This was missed by #798, which removed the unused get_cmap and to_rgba imports from this same block and left import matplotlib one line below them. Dropping line 174 finishes that cleanup.

How it surfaced

Copilot review flagged it on the Chinese edition's sync PR for #798 — QuantEcon/lecture-intro.zh-cn#268. It is not being fixed there: the line is inherited from this repo, so patching it in a translation edition would create drift from source on non-localisation grounds and would likely be reintroduced by the next resync. Fixing it here lets it flow down through the normal sync instead.

(For the record, the Chinese edition separately carries import matplotlib as mpl, which is used — it registers the CJK font. That one is a legitimate localisation addition and is unaffected.)

Happy to send a one-line PR if useful.

🤖 Generated with Claude Code

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

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.

Direzione di ricerca

Apri laffer_adaptive.md in Open lectures/ ed esamina il blocco degli import intorno alle righe 170–175. Rimuovi l’import inutilizzato matplotlib alla riga 174, quindi conferma che gli import rimanenti matplotlib.pyplot e matplotlib.ticker siano ancora utilizzati e che la lezione sorgente non contenga più l’import inutilizzato.

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

Valutazione

Stack tecnologico
matplotlib, numpy, python
Ambito
documentation
Tipo di issue
Refactoring
Difficoltà
1/5
Tempo stimato
Meno di un'ora
Stato di attività
Tranquilla
Chiarezza
Specificata chiaramente
Idoneità per principianti
90/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.