micropy-cli icon indicating copy to clipboard operation
micropy-cli copied to clipboard

feat: Improve Pylint Syntax

Open BradenM opened this issue 5 years ago • 6 comments

Changes

  • use improved syntax for .pylintrc as outlined in #96
  • automatically add src/lib if such folder exists
  • update .pylintrc updating flow
  • added snapshot testing

BradenM avatar Jan 03 '20 08:01 BradenM

Codacy Here is an overview of what got changed by this pull request:


Coverage increased per file
===========================
+ micropy/project/modules/packages.py  1
         

Coverage decreased per file
===========================
- micropy/config/config.py  -13
- micropy/project/template.py  -1
         

Clones added
============
- micropy/project/template.py  2
         

See the complete overview on Codacy

BradenM avatar Jan 03 '20 08:01 BradenM

@BradenM can I help with this?

Also, I was noticing your comment about adding src/lib IF it exists. For a new project, can we force it into existence and always add it? I feel like its the correct coding practice.

askpatrickw avatar May 23 '20 18:05 askpatrickw

For sure! IIRC, I believe I finished the implementation and just needed to fix some tests...

Looking back, I may have been a bit (a lot) too strict with code coverage... and as a result there are a lot of poorly written, flaky tests :grimacing:.

So just navigating that mess should be all thats left haha. See #79 for more details.

As for requiring src/lib, open to hearing your thoughts, but have so far been against that in an attempt to keep micropy-cli as unopinionated as possible. Some projects just utilize entirely frozen modules, and therefore dont use src/lib (or something similiar) at all :shrug:

Perhaps a configuration option or something may be a good idea though...

BradenM avatar May 24 '20 09:05 BradenM

I tend to think opinionated is good, sorta fits the Zen of Python that there should be one way... but of course there are exceptions. ;-)

I wonder if 'power' users would fine that if you selected create boot.py and main.py you also added src/lib. That seems like it fits together.

I'll try to have a look, and I might get stuck.. but I'll give it a go.

This week is very odd for me with the US Holiday and some additional time potentially away from internet access, so if I go dark... I'll be back the following week.

askpatrickw avatar May 25 '20 20:05 askpatrickw

@askpatrickw Think I can agree with creating src/lib if they select the bootstrap option... makes sense.

And all good! My schedule has been a bit wild recently as well haha, I appreciate your help!

BradenM avatar May 27 '20 22:05 BradenM

I've spent a few hours looking at this and I am stumped so I'm going to back away on this. Sorry I can't be of more help.

askpatrickw avatar Jun 16 '20 19:06 askpatrickw