Skip to content

Pylint #166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 106 commits into from
May 28, 2018
Merged

Pylint #166

merged 106 commits into from
May 28, 2018

Conversation

craigargh
Copy link
Contributor

Make all Python files in guides PEP8 compliant
#2

@ladyada
Copy link
Member

ladyada commented May 15, 2018

o_O amazing! we'll start lookin!

  • 3D_Printed_LED_Microphone_Flag/3D_Printed_LED_Microphone_Flag.py makes some significant changes

  • 3D_Printed_Guardian_Sword/3D_Printed_Guardian_Sword.py checked ok!

  • 3D_Printed_NeoPixel_Gas_Mask/3D_Printed_NeoPixel_Gas_Mask.py ok!

  • 3D_Printed_NeoPixel_Ring_Hair_Dress.py looks ok

@kattni
Copy link
Contributor

kattni commented May 17, 2018

@craigargh Can you give us a status update as to where you're at with this? Thanks!

@kattni
Copy link
Contributor

kattni commented May 17, 2018

@craigargh But please don't worry about it until you get home! I remembered you're about NY at the moment. Hope you have a wonderful trip!

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job with this! Just a couple issues I found.

# A2 = 110
# As2 = 117 # 's' stands for sharp: A#2
# Bb2 = 117
# B2 = 123
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think these should be commented out.


# clear all LEDs for breathing effect


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we disable the two lines before methods requirement?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can add that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checked this. Surprisingly pylint doesn't care how many blank lines there are before a function. The blank lines were caused by me running a PEP8 auto-formatter on the file. I've moved the comments onto the first line of the functions instead. Let me know if that's OK.

A3 = 220
Bb3 = 233
B3 = 247
# A3 = 220
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these commented too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pylint was complaining that the variables weren't being used. I can uncomment them and add a ignore rule to pylint so that it's fine with unused variables.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok. An ignore rule would be awesome. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed the comments for all of these

@craigargh
Copy link
Contributor Author

@kattni I'm back in the UK now. In terms of status, every file should now pass the pylint checks. Other than the comments on this pull request, there isn't anything else that needs to change.

@kattni
Copy link
Contributor

kattni commented May 22, 2018

@craigargh Brilliant, thank you for the update and all the amazing work! Let us know when you're ready for review.

Copy link
Contributor

@kattni kattni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@craigargh Thanks so much for doing this! We should have been clearer on what we meant when asking you to add the pylint disable rules. I've clarified it below. Please take a look. Thanks again!

@@ -52,7 +52,7 @@ confidence=
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
# disable=import-error,print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call
disable=too-many-instance-attributes,len-as-condition,too-few-public-methods,anomalous-backslash-in-string,no-else-return,simplifiable-if-statement,too-many-arguments,duplicate-code,no-name-in-module,no-member,print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,import-error,missing-docstring,invalid-name,bad-whitespace, --msg-template='{path} {line}: {msg} ({symbol})' */*.py
disable=too-many-instance-attributes,len-as-condition,too-few-public-methods,anomalous-backslash-in-string,no-else-return,simplifiable-if-statement,too-many-arguments,duplicate-code,no-name-in-module,no-member,print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,import-error,missing-docstring,invalid-name,bad-whitespace,unused-variable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@craigargh When @tannewt agreed with adding the pylint disable rules, he meant adding them into the individual files that he noted. The .pylintrc disable command we have from PR #164 is what we want to go with moving forward. Please remove the rules you added to this command, and instead add them to the files specifically noted by Scott. Thank you!

@kattni
Copy link
Contributor

kattni commented May 28, 2018

@craigargh I'm going to merge this as is. I'll go ahead and make the requested changes locally and get them taken care of. Thank you so much for all of this work! We're incredibly appreciative of everything you've done here!

@kattni kattni merged commit b5d5733 into adafruit:master May 28, 2018
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.

5 participants