matplotlib / matplotlib/cmocean
Submodule plots is in `__all__` but not imported in `__init__.py`
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 269
- Forks
- 54
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Hi,
This might be deliberate but it seems that the submodule plots is not imported in the __init__.py but is included in __all__.
I can see there are some optional dependencies for some of the functions but their imports are only inside the concerned functions.
That means that if someone wants to use the plots submodule they would need to explicitly import it, which seems a bit strange when the documentation has this:
import cmocean
cmocean.plots.plot_gallery()
Which currently gives:
AttributeError: module 'cmocean' has no attribute 'plots'
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne im package init.py und vergleiche dessen all-Eintrag für plots mit dem dokumentierten Importbeispiel. Überprüfe das aktuelle Verhalten von import cmocean, gefolgt von cmocean.plots.plot_gallery(). Als erledigt gilt die Aufgabe, wenn der dokumentierte Zugriff keine AttributeError-Exception mehr auslöst.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- api
- Issue-Typ
- Bug
- Schwierigkeit
- 1/5
- Geschätzter Aufwand
- Unter einer Stunde
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 48/100