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

[BUG]: Cannot resolve `Lib.*` and `Drawing.*` methods

Aperta
#8,060 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
72/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript

Direzione di ricerca

Review src/lib/index.js and src/components/drawing/index.js, then inspect src/plots/cartesian/transition_axes.js for the reported unresolved symbols. Reproduce the PyCharm warnings and check whether the same export pattern affects other modules. Done when the reported Lib., Drawing., setTranslate, and setScale references resolve without changing runtime behavior.

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

Descrizione

bug P3 plotly-internal size: 1

PyCharm reports methods imported from https://github.com/plotly/plotly.js/blob/main/src/lib/index.js as unresolved, for example:

var Lib = require('../../lib');

Lib.coerce(...)
Lib.coerceSelectionMarkerOpacity(...)

I get:

Unresolved function or method `coerce()`
Unresolved function or method `coerceSelectionMarkerOpacity()`

This makes development difficult because IDE navigation to the lib methods does not work.

The issue comes from this assignment:
https://github.com/plotly/plotly.js/blob/f618df5fe66945df1a165d04dfe19b91f724f927/src/lib/index.js#L13

The static analysis doesn't like it.

Changing it to:

- var lib = (module.exports = {});
+ module.exports = {};
+ var lib = module.exports;

allows PyCharm (or maybe other IDEs?) to correctly resolve the exported methods.

The same problem also occurs in:
https://github.com/plotly/plotly.js/blob/f618df5fe66945df1a165d04dfe19b91f724f927/src/components/drawing/index.js#L23

For:
https://github.com/plotly/plotly.js/blob/f618df5fe66945df1a165d04dfe19b91f724f927/src/plots/cartesian/transition_axes.js#L41-L42

I get:

Unresolved variable setTranslate 
Unresolved variable setScale

And there are more.

Lingua principale
JavaScript
Stelle
18.3k
Fork
2k
Merge medio
2g 10h
PR unite (30g)
30

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 plotly/plotly.js

Tutte le issue di plotly/plotly.js

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.