ChatGPT
ChatGPT copied to clipboard
[Community request] PyLint support - Formatting
Formatting and consistency is extremely important in large projects. However, as it is currently exam season for me, I don't have enough time to dedicate to this.
If anyone is willing, please format the code so that it passes PyLint. I'm not sure if this can be done automatically.
Sincere thanks
@acheong08 Hi I can take this, but I will use black and flake 8 instead of pylint,is that OK?
It can be automatic by pre-commit on every git commit.
That works as well. Can you also make a pull request for a workflow that checks that instead of PyLint?
Sure, I will add a github action for this
Thank you!
Couldn't this be easily done and integrated using something like https://github.com/pre-commit/pre-commit as it is amazing in maintaining consistency as well as you can link flake 8/black/pylint ect
I wasn't aware of this. I will look into it today
Couldn't this be easily done and integrated using something like
https://github.com/pre-commit/pre-commitas it is amazing in maintaining consistency as well as you can link flake 8/black/pylint ect
Yes, That’s what I’m trying to do.
Couldn't this be easily done and integrated using something like
https://github.com/pre-commit/pre-commitas it is amazing in maintaining consistency as well as you can link flake 8/black/pylint ectYes, That’s what I’m trying to do.
Awesome I will work on a version too and see where I can help going forward. I am learning myself and always looking to put in help where I can.
@acheong08 @PyRo1121 I create a PR https://github.com/acheong08/ChatGPT/pull/121 for this, I check the github CI, it all passed. Please review.
@Vaayne https://github.com/acheong08/ChatGPT/pull/119 Duplicate
sure
@Vaayne You could always pull request to help with args. I put together a default setup for them for now. It will handle keeping the project in a set format plus any linting/debugging you could want with .pre-commit-config.yaml using Pre-commit Hooks. This could use more fine tuning as I learn the code base I will contribute more.
TODO:
setup.py:1:0: C0114: Missing module docstring (missing-module-docstring)
setup.py:18:21: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
************* Module src.revChatGPT
src/revChatGPT/__init__.py:1:0: C0103: Module name "revChatGPT" doesn't conform to snake_case naming style (invalid-name)
************* Module src.revChatGPT.__main__
src/revChatGPT/__main__.py:1:0: C0114: Missing module docstring (missing-module-docstring)
src/revChatGPT/__main__.py:6:0: E0401: Unable to import 'revChatGPT.revChatGPT' (import-error)
src/revChatGPT/__main__.py:[9](https://github.com/acheong08/ChatGPT/actions/runs/3636482712/jobs/6136504202#step:5:10):0: C0116: Missing function or method docstring (missing-function-docstring)
src/revChatGPT/__main__.py:9:14: W0621: Redefining name 'prompt' from outer scope (line 44) (redefined-outer-name)
src/revChatGPT/__main__.py:41:8: R1722: Consider using sys.exit() (consider-using-sys-exit)
src/revChatGPT/__main__.py:44:8: C0[10](https://github.com/acheong08/ChatGPT/actions/runs/3636482712/jobs/6136504202#step:5:11)3: Constant name "prompt" doesn't conform to UPPER_CASE naming style (invalid-name)
src/revChatGPT/__main__.py:46:12: R1724: Unnecessary "elif" after "continue", remove the leading "el" from "elif" (no-else-continue)
src/revChatGPT/__main__.py:78:12: C0103: Constant name "lines_printed" doesn't conform to UPPER_CASE naming style (invalid-name)
src/revChatGPT/__main__.py:96:19: W0703: Catching too general exception Exception (broad-except)
src/revChatGPT/__main__.py:105:19: W0703: Catching too general exception Exception (broad-except)
************* Module src.revChatGPT.revChatGPT
src/revChatGPT/revChatGPT.py:49:0: C0301: Line too long ([11](https://github.com/acheong08/ChatGPT/actions/runs/3636482712/jobs/6136504202#step:5:12)7/100) (line-too-long)
src/revChatGPT/revChatGPT.py:219:0: C0301: Line too long (113/100) (line-too-long)
src/revChatGPT/revChatGPT.py:336:0: C0301: Line too long (117/100) (line-too-long)
src/revChatGPT/revChatGPT.py:351:0: C0301: Line too long (107/100) (line-too-long)
src/revChatGPT/revChatGPT.py:359:0: C0301: Line too long (117/100) (line-too-long)
src/revChatGPT/revChatGPT.py:384:0: C0301: Line too long (117/100) (line-too-long)
src/revChatGPT/revChatGPT.py:410:0: C0301: Line too long (117/100) (line-too-long)
src/revChatGPT/revChatGPT.py:433:0: C0301: Line too long (117/100) (line-too-long)
src/revChatGPT/revChatGPT.py:457:0: C0301: Line too long (1[12](https://github.com/acheong08/ChatGPT/actions/runs/3636482712/jobs/6136504202#step:5:13)/100) (line-too-long)
src/revChatGPT/revChatGPT.py:463:0: C0301: Line too long (107/100) (line-too-long)
src/revChatGPT/revChatGPT.py:472:0: C0301: Line too long (117/100) (line-too-long)
src/revChatGPT/revChatGPT.py:494:0: C0301: Line too long (110/100) (line-too-long)
src/revChatGPT/revChatGPT.py:500:0: C0301: Line too long (117/100) (line-too-long)
src/revChatGPT/revChatGPT.py:521:0: C0301: Line too long (117/100) (line-too-long)
src/revChatGPT/revChatGPT.py:565:0: C0301: Line too long (117/100) (line-too-long)
src/revChatGPT/revChatGPT.py:1:0: C0114: Missing module docstring (missing-module-docstring)
src/revChatGPT/revChatGPT.py:1:0: C0103: Module name "revChatGPT" doesn't conform to snake_case naming style (invalid-name)
src/revChatGPT/revChatGPT.py:9:0: E0401: Unable to import 'requests' (import-error)
src/revChatGPT/revChatGPT.py:10:0: E0401: Unable to import 'tls_client' (import-error)
src/revChatGPT/revChatGPT.py:[13](https://github.com/acheong08/ChatGPT/actions/runs/3636482712/jobs/6136504202#step:5:14):0: C0116: Missing function or method docstring (missing-function-docstring)
src/revChatGPT/revChatGPT.py:18:0: C0115: Missing class docstring (missing-class-docstring)
src/revChatGPT/revChatGPT.py:34:4: C0116: Missing function or method docstring (missing-function-docstring)
src/revChatGPT/revChatGPT.py:39:4: C0116: Missing function or method docstring (missing-function-docstring)
src/revChatGPT/revChatGPT.py:60:4: C0116: Missing function or method docstring (missing-function-docstring)
src/revChatGPT/revChatGPT.py:86:12: W0702: No exception type(s) specified (bare-except)
src/revChatGPT/revChatGPT.py:79:16: W0702: No exception type(s) specified (bare-except)
src/revChatGPT/revChatGPT.py:90:4: C0116: Missing function or method docstring (missing-function-docstring)
src/revChatGPT/revChatGPT.py:92:8: C0103: Variable name "s" doesn't conform to snake_case naming style (invalid-name)
src/revChatGPT/revChatGPT.py:120:15: W0703: Catching too general exception Exception (broad-except)
src/revChatGPT/revChatGPT.py:[14](https://github.com/acheong08/ChatGPT/actions/runs/3636482712/jobs/6136504202#step:5:15)3:12: W0702: No exception type(s) specified (bare-except)
src/revChatGPT/revChatGPT.py:164:4: C0116: Missing function or method docstring (missing-function-docstring)
src/revChatGPT/revChatGPT.py:180:8: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
src/revChatGPT/revChatGPT.py:187:4: C0116: Missing function or method docstring (missing-function-docstring)
src/revChatGPT/revChatGPT.py:191:4: C0116: Missing function or method docstring (missing-function-docstring)
src/revChatGPT/revChatGPT.py:192:8: R1720: Unnecessary "elif" after "raise", remove the leading "el" from "elif" (no-else-raise)
src/revChatGPT/revChatGPT.py:204:12: C0103: Variable name "s" doesn't conform to snake_case naming style (invalid-name)
src/revChatGPT/revChatGPT.py:236:19: W0703: Catching too general exception Exception (broad-except)
src/revChatGPT/revChatGPT.py:191:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
src/revChatGPT/revChatGPT.py:246:4: C0116: Missing function or method docstring (missing-function-docstring)
src/revChatGPT/revChatGPT.py:287:0: C01[15](https://github.com/acheong08/ChatGPT/actions/runs/3636482712/jobs/6136504202#step:5:16): Missing class docstring (missing-class-docstring)
src/revChatGPT/revChatGPT.py:515:4: C01[16](https://github.com/acheong08/ChatGPT/actions/runs/3636482712/jobs/6136504202#step:5:17): Missing function or method docstring (missing-function-docstring)
src/revChatGPT/revChatGPT.py:558:4: C0116: Missing function or method docstring (missing-function-docstring)
-----------------------------------
Your code has been rated at 8.11/10
Error: Process completed with exit code [30](https://github.com/acheong08/ChatGPT/actions/runs/3636482712/jobs/6136504202#step:5:31).