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

Drop Python 2 support #22

Merged
merged 23 commits into from
Dec 2, 2023
Merged

Conversation

duckduckgrayduck
Copy link

No description provided.

@duckduckgrayduck
Copy link
Author

Will close #10 and get us one step closer to running black & pylint on commits and PRs

@duckduckgrayduck duckduckgrayduck force-pushed the master branch 2 times, most recently from 6d81c97 to 0a79cbc Compare November 29, 2023 23:18
@duckduckgrayduck
Copy link
Author

This is where we are at with Pylint:

************* Module documentcloud.addon
documentcloud/addon.py:27:8: E1111: Assigning result of a function call, where the function has no return (assignment-from-no-return)
documentcloud/addon.py:27:8: W0612: Unused variable 'client' (unused-variable)
documentcloud/addon.py:68:34: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
documentcloud/addon.py:122:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
documentcloud/addon.py:178:19: W3101: Missing timeout argument for method 'requests.put' can cause your program to hang indefinitely (missing-timeout)
documentcloud/addon.py:202:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
************* Module documentcloud.documents
documentcloud/documents.py:190:0: C0301: Line too long (93/88) (line-too-long)
documentcloud/documents.py:378:0: C0301: Line too long (89/88) (line-too-long)
documentcloud/documents.py:65:8: R1725: Consider using Python 3 style super() without arguments (super-with-arguments)
documentcloud/documents.py:280:18: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
documentcloud/documents.py:372:4: R0914: Too many local variables (18/15) (too-many-locals)
documentcloud/documents.py:396:8: W1203: Use lazy % formatting in logging functions (logging-fstring-interpolation)
documentcloud/documents.py:408:12: W1201: Use lazy % formatting in logging functions (logging-not-lazy)
documentcloud/documents.py:432:20: W1201: Use lazy % formatting in logging functions (logging-not-lazy)
documentcloud/documents.py:445:16: W1203: Use lazy % formatting in logging functions (logging-fstring-interpolation)
documentcloud/documents.py:448:34: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
documentcloud/documents.py:453:24: W1203: Use lazy % formatting in logging functions (logging-fstring-interpolation)
documentcloud/documents.py:467:20: W1201: Use lazy % formatting in logging functions (logging-not-lazy)
documentcloud/documents.py:372:4: R0912: Too many branches (14/12) (too-many-branches)
documentcloud/documents.py:492:24: W1202: Use lazy % formatting in logging functions (logging-format-interpolation)
documentcloud/documents.py:512:20: W1201: Use lazy % formatting in logging functions (logging-not-lazy)
************* Module documentcloud.exceptions
documentcloud/exceptions.py:19:8: R1725: Consider using Python 3 style super() without arguments (super-with-arguments)
************* Module documentcloud.base
documentcloud/base.py:102:12: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
documentcloud/base.py:123:8: R1725: Consider using Python 3 style super() without arguments (super-with-arguments)
documentcloud/base.py:172:8: R1725: Consider using Python 3 style super() without arguments (super-with-arguments)
documentcloud/base.py:194:8: R1725: Consider using Python 3 style super() without arguments (super-with-arguments)
documentcloud/base.py:203:12: R1725: Consider using Python 3 style super() without arguments (super-with-arguments)
documentcloud/base.py:216:8: R1725: Consider using Python 3 style super() without arguments (super-with-arguments)
************* Module documentcloud.client
documentcloud/client.py:129:8: W1203: Use lazy % formatting in logging functions (logging-fstring-interpolation)
documentcloud/client.py:145:8: W1203: Use lazy % formatting in logging functions (logging-fstring-interpolation)
documentcloud/client.py:172:16: W0707: Consider explicitly re-raising using 'raise DoesNotExistError(response=exc.response) from exc' (raise-missing-from)
documentcloud/client.py:174:16: W0707: Consider explicitly re-raising using 'raise APIError(response=exc.response) from exc' (raise-missing-from)
************* Module documentcloud.toolbox
documentcloud/toolbox.py:9:0: C0411: standard import "from urllib.parse import urlparse" should be placed before "import requests" (wrong-import-order)
documentcloud/toolbox.py:10:0: C0411: standard import "from itertools import zip_longest" should be placed before "import requests" (wrong-import-order)
************* Module documentcloud.projects
documentcloud/projects.py:17:8: R1725: Consider using Python 3 style super() without arguments (super-with-arguments)
documentcloud/projects.py:26:8: R1725: Consider using Python 3 style super() without arguments (super-with-arguments)
documentcloud/projects.py:102:4: W0237: Parameter 'id_' has been renamed to 'id' in overriding 'ProjectClient.get' method (arguments-renamed)
documentcloud/projects.py:102:4: W0237: Parameter 'expand' has been renamed to 'title' in overriding 'ProjectClient.get' method (arguments-renamed)
documentcloud/projects.py:118:15: R1725: Consider using Python 3 style super() without arguments (super-with-arguments)


Your code has been rated at 9.52/10

documentcloud/base.py Show resolved Hide resolved
documentcloud/client.py Outdated Show resolved Hide resolved
@duckduckgrayduck duckduckgrayduck merged commit d6b5331 into MuckRock:master Dec 2, 2023
6 checks passed
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.

2 participants