Skip to content
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

adding code enhancements to helper.py file #1218

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leoscarlato
Copy link
Contributor

When adding some code enhancements, mainly changing .format expressions to f-string expressions, and making long lines into two shorter lines of code, I was able to increase the code quality from 6.29 to 7.21:

************* Module helper
installer\helper.py:49:56: C0303: Trailing whitespace (trailing-whitespace)
installer\helper.py:124:0: C0303: Trailing whitespace (trailing-whitespace)
installer\helper.py:163:61: C0303: Trailing whitespace (trailing-whitespace)
installer\helper.py:1:0: C0114: Missing module docstring (missing-module-docstring)
installer\helper.py:17:4: W0622: Redefining built-in 'input' (redefined-builtin)
installer\helper.py:22:0: C0116: Missing function or method docstring (missing-function-docstring)
installer\helper.py:27:0: C0103: Constant name "debug_log" doesn't conform to UPPER_CASE naming style (invalid-name)
installer\helper.py:30:0: C0116: Missing function or method docstring (missing-function-docstring)
installer\helper.py:31:4: W0603: Using the global statement (global-statement)
installer\helper.py:32:16: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
installer\helper.py:36:0: C0116: Missing function or method docstring (missing-function-docstring)
installer\helper.py:40:0: C0116: Missing function or method docstring (missing-function-docstring)
installer\helper.py:57:0: C0116: Missing function or method docstring (missing-function-docstring)
installer\helper.py:61:11: W0718: Catching too general exception Exception (broad-exception-caught)
installer\helper.py:70:15: W0718: Catching too general exception BaseException (broad-exception-caught)
installer\helper.py:75:0: C0116: Missing function or method docstring (missing-function-docstring)
installer\helper.py:80:0: C0116: Missing function or method docstring (missing-function-docstring)
installer\helper.py:81:13: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
installer\helper.py:81:32: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
installer\helper.py:84:0: C0103: Constant name "spinning" doesn't conform to UPPER_CASE naming style (invalid-name)
installer\helper.py:87:0: C0116: Missing function or method docstring (missing-function-docstring)
installer\helper.py:88:4: W0603: Using the global statement (global-statement)
installer\helper.py:103:0: C0116: Missing function or method docstring (missing-function-docstring)
installer\helper.py:104:4: W0603: Using the global statement (global-statement)
installer\helper.py:108:0: C0116: Missing function or method docstring (missing-function-docstring)
installer\helper.py:121:11: R1716: Simplify chained comparison between the operands (chained-comparison)
installer\helper.py:127:0: C0116: Missing function or method docstring (missing-function-docstring)
installer\helper.py:131:19: R1719: The if expression can be replaced with 'test' (simplifiable-if-expression)
installer\helper.py:135:0: C0116: Missing function or method docstring (missing-function-docstring)
installer\helper.py:136:4: C0115: Missing class docstring (missing-class-docstring)
installer\helper.py:137:8: C0116: Missing function or method docstring (missing-function-docstring)
installer\helper.py:140:8: C0116: Missing function or method docstring (missing-function-docstring)
installer\helper.py:167:8: W0201: Attribute 'exception' defined outside init (attribute-defined-outside-init)
installer\helper.py:175:4: W0201: Attribute 'cli_output' defined outside init (attribute-defined-outside-init)
installer\helper.py:145:4: C0115: Missing class docstring (missing-class-docstring)
installer\helper.py:146:8: C0116: Missing function or method docstring (missing-function-docstring)
installer\helper.py:149:8: C0116: Missing function or method docstring (missing-function-docstring)
installer\helper.py:175:4: W0201: Attribute 'cli_output' defined outside init (attribute-defined-outside-init)
installer\helper.py:8:0: W0611: Unused IS_WIN imported from unix_windows (unused-import)


Your code has been rated at 7.21/10 (previous run: 7.14/10, +0.07)

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.

1 participant