question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Autocompletion and linting not available for libraries in src/lib

See original GitHub issue

Hi there,

Problem

I am having some problems with libraries not getting used for auto completion/ Default sys.path is the root folder and /lib

>>> import sys
>>> sys.path
['', '/lib']

The resulting .vscode\settings.json and .pylintrc do not have this folder included. Currently this results in not getting auto completion and proper linting for user defined libraries.

Expected behaviour: Since the /lib folder on the device is available for imports, it should have working auto completion and linting working properly.

Possible fix: Because user libraries go into the lib folder I propose adding the “src/lib” folder to the .vscode\settings.json and .pylintrc file.

What are your thoughts? Let me know!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
MathijsNLcommented, Dec 9, 2019

No problem, I appreciate you taking the time to implement this feature.

I installed a new project and tried to install custom packages. Works like a charm! Things I checked:

  • .vscode/settings.json looks correct, intellisense is working
  • requirements.txt looks correct, but when running micropy install afterwards it gives some errors
  • .pylintrc looks correct, pylint is working

I will try to look into the problem with the requirements.txt tonight or tomorrow hopefully.

0reactions
BradenMcommented, Dec 9, 2019

Thanks for the report!

Feel free to open any new issues when you have the time. Thanks again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio Code: Intellisense not working - Stack Overflow
This can be caused by many reasons, some of them are as follows. Python executable path in vscode is incorrect. Solution: Configure the...
Read more >
Code autocompletion not working for crates using C libraries
Code autocompletion and suggestions don't work with certain external crates or some functions in them. Code still compiles and shows no errors ...
Read more >
VS Code autocomplete for library not showing : r/rust - Reddit
I've create a project to experiment creating a lib file as well as a binary file. The only thing that bothers me is...
Read more >
CodeMirror 5 User Manual
CodeMirror is a code-editor component that can be embedded in Web pages. The core library provides only the editor component, no accompanying buttons,...
Read more >
CodeMirror: User Manual
The core library provides only the editor component, no accompanying buttons, ... This indicates that when a key is not found in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found