Pylint settings for micropython

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
ruffasdagut
Posts: 2
Joined: Sun Jun 24, 2018 9:55 pm

Pylint settings for micropython

Post by ruffasdagut » Sun Jun 24, 2018 10:00 pm

Greetings, I am new to micropython and am trying to get a dev environment setup and working. I have been looking around but haven't found anyone explaining how to configure pylint to know about micropython classes. Whenever pylint runs it wants to tell me that machine and micropython etc are invalid.

I pulled the git repo but didn't see an obvious way to point pylint at it to know about the os classes that differ from standard python.

cefn
Posts: 230
Joined: Tue Aug 09, 2016 10:58 am

Re: Pylint settings for micropython

Post by cefn » Mon Jun 25, 2018 7:14 pm

What kind of editor are you trying to use, for which pylint is a plugin?

There are editors like Thonny and Mu, and a plugin for PyCharm which are all cross-platform, free to download and install, which I would expect should recognise Micropython libraries, as they target Micropython specifically. I tend to just put up with the build errors in PyCharm without the plugin, but I admire your attention to detail.

https://bitbucket.org/plas/thonny-micropython

https://codewith.mu/

https://blog.jetbrains.com/pycharm/2018 ... r-pycharm/

ruffasdagut
Posts: 2
Joined: Sun Jun 24, 2018 9:55 pm

Re: Pylint settings for micropython

Post by ruffasdagut » Mon Jun 25, 2018 11:21 pm

I am RE\DevOps by day so it totally bugs me when I see those types of errors.

I am using Visual Studio Code as I use it for other projects and languages. The Pymaker plugin from pycom works pretty good for connecting to the serial and then everything else for code formatting and such works great, the linter also works fine but only for classes I define or ones that are shared with python itself.

I'll checkout those other editors.

Post Reply