smuggler icon indicating copy to clipboard operation
smuggler copied to clipboard

Pylint fixes

Open melardev opened this issue 5 years ago • 2 comments

Hi. This pull request may look scary, but I have for the most part only changed the formatting according to pylint. I ran pylint, there were many formatting issues, I fixed them, The changes I made:

  • Most of them are formatting issues
    • == None in python should be is None
    • type(var) == type("string") can be replaced by type(var) == str , this is not a pylint warning, but I changed it for readability.
    • There are too many space violations: %i, should be % i
    • There are too many redundant parentheses, those were flagged by pylint.
    • Docstrings should go with triple-double quotes, and not triple single quotes, this was flagged by pylint.
    • python files must end with a new line
    • there should be 2 spaces between import statements and the below code.

The only code change I made was at EasySSL.py:

socket.setdefaulttimeout(timeout)

This line was executed anyway in the if, as well as the else block, also setdefaulttimeout(timeout) does not return anything.

Feel free to discard the PR if you think there are too many changes.

melardev avatar Jun 27 '20 12:06 melardev

The @formatter:off and @formatter:on is a switch to instruct IDEs such as Pycharm to not format that block because it would break the intended indentation. Pycharm would remove any additional spaces, for example:

    BLACK   = 0
    BLUE    = 1

would become

    BLACK = 0
    BLUE = 1

melardev avatar Jun 27 '20 13:06 melardev

Thanks so much for the lint check! Give me some time to parse over these changes and if everything is good i'll merge the pull.

Best, Evan

defparam avatar Jun 27 '20 14:06 defparam