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

Fix pylint suggestions #29

Merged
merged 2 commits into from
Dec 5, 2021

Conversation

patricklodder
Copy link
Member

In preparation of having automated linters, I ran pylint manually to fix any existing issues, so that we have a clean starting slate once I PR linters. Some issues I originally worked on have already been solved with #26 so I am working on top of that and making that blocking for this PR.

Fixes:

  • C0114: Missing module docstring -> fixed by adding the docstring at the top of the entrypoint.py file
  • C0116: Missing function or method docstring, in main() -> fixed by adding a docstring 🤓
  • W1514/PEP-0598: Using open without explicitly specifying an encoding, in executable_options() -> fixed by specifying the manpage encoding as UTF-8
  • W1510: Using subprocess.run without explicitly set check, in create_datadir() -> fixed by adding check=True argument
  • R1722: Consider using sys.exit() (in execute() -> fixed by separating print from exit, and using sys.exit(1). Although this is just a recommendation, I think it's good to just follow the recommendations - saves time having to argue 😁

@patricklodder patricklodder added the qa Such quality label Dec 4, 2021
@patricklodder patricklodder changed the title Qa/fix pylint suggestions Fix pylint suggestions Dec 4, 2021
C0114: Missing module docstring (missing-module-docstring)
  fixed by adding the docstring

C0116: Missing function or method docstring
  fixed by adding the docstring to main()

W1514: Using open without explicitly specifying an encoding
  fixed by specifying the manpage encoding as UTF-8

W1510: Using subprocess.run without explicitly set `check`
  fixed by adding check=True argument

R1722: Consider using sys.exit()
  fixed by separating print from exit, and using sys.exit(1)
@patricklodder patricklodder force-pushed the qa/fix-pylint-suggestions branch from e45aedb to f49897c Compare December 4, 2021 21:19
@patricklodder patricklodder marked this pull request as ready for review December 4, 2021 21:19
@patricklodder
Copy link
Member Author

Rebased & ready for review.

xanimo
xanimo previously approved these changes Dec 4, 2021
Copy link
Member

@xanimo xanimo left a comment

Choose a reason for hiding this comment

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

ACK

pylint 1.14.5/bullseye/entrypoint.py 

------------------------------------
Your code has been rated at 10.00/10

AbcSxyZ
AbcSxyZ previously approved these changes Dec 4, 2021
Copy link
Contributor

@AbcSxyZ AbcSxyZ left a comment

Choose a reason for hiding this comment

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

ACK too.

Changes are needed for sys.exit for tests in any case, the script need to return properly and to not exit. Will raise PR after this.

Copy link
Contributor

@AbcSxyZ AbcSxyZ left a comment

Choose a reason for hiding this comment

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

Small improvement

1.14.5/bullseye/entrypoint.py Outdated Show resolved Hide resolved
@patricklodder patricklodder mentioned this pull request Dec 4, 2021
@AbcSxyZ AbcSxyZ mentioned this pull request Dec 4, 2021
Co-authored-by: AbcSxyZ <[email protected]>
@patricklodder patricklodder dismissed stale reviews from AbcSxyZ and xanimo via 068c137 December 4, 2021 22:50
@patricklodder patricklodder requested a review from xanimo December 4, 2021 22:50
Copy link
Member

@xanimo xanimo left a comment

Choose a reason for hiding this comment

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

ACK

@xanimo xanimo merged commit 03ae15f into dogecoin:main Dec 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qa Such quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants