Skip to content

Fix unresolved Lib.* and Drawing.* methods in PyCharm/ VS Code - #8061

Open
Lexachoc wants to merge 2 commits into
plotly:mainfrom
Lexachoc:fix-lib-resolve
Open

Lexachoc wants to merge 2 commits into
plotly:mainfrom
Lexachoc:fix-lib-resolve

Conversation

@Lexachoc

@Lexachoc Lexachoc commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Closes #8060

This may also affect other IDEs, but I only use PyCharm/ VS Code, so it would be helpful if others could confirm.

The same problem also occurs in:

var drawing = (module.exports = {});


Ther are more similar issues when running PyCharm's Unresolved reference inspection.

For example:

var annotationAttrs = require('../../components/annotations/attributes');

arrowsize: extendFlat({}, annotationAttrs.arrowsize, {

I get:

Unresolved variable arrowsize

In this case, annotations/attributes.js exports the attributes by:

module.exports = templatedArray('annotation', {

PyCharm doesn't like that.
Making the export more explicit would require a somewhat larger refactor, for example:

- module.exports = templatedArray('annotation', {
+ var attrs = {
      visible: {
          // ...
      },
      // ...
- });
+ };
+ 
+ templatedArray('annotation', attrs);
+ 
+ module.exports = attrs;

Therefore I didn't include fix for these cases in this PR.

@Lexachoc

Copy link
Copy Markdown
Contributor Author

I don't have permission to add the no-draftlog label. If draftlog is not needed, could someone add it for me?

Refactor module exports in drawing component
@Lexachoc Lexachoc changed the title Fix unresolved Lib.* methods in PyCharm Fix unresolved Lib.* and Drawing.* methods in PyCharm Sep 21, 2026
@Lexachoc Lexachoc changed the title Fix unresolved Lib.* and Drawing.* methods in PyCharm Fix unresolved Lib.* and Drawing.* methods in PyCharm/ VS Code Sep 21, 2026
@camdecoster camdecoster self-assigned this Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CHORE]: Cannot resolve Lib.* and Drawing.* methods

2 participants