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

style: lint all python files #1228

Merged

Conversation

ReenigneArcher
Copy link
Contributor

Description

The motivation behind this PR came after running autopep8 on the project... which mostly just fixed some whitespace issues. Then I thought it would be good to lint all the python files in the project.

In summary:

  • No longer ignoring W293 - blank line contains whitespace
  • add venv as exclude path and run flake8 against the current directory (recursively)
  • changed flake8 config max-line length to match the CI (127 characters)
  • added groups for each flake8 pass in the CI
  • some tests had variables that were not used, I added assert isinstance (variable, list) ... please double check
  • I did not fix any functions that complained about being too complex, just added # noqa: C901
  • Some .format() methods were not correct in ./tools/plex-markwatched.py, these were converted to f-strings.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the docstring for new or existing methods
  • I have added tests when applicable

@ReenigneArcher ReenigneArcher force-pushed the style-lint-all-python-files branch 2 times, most recently from 1c9caba to 160a3d2 Compare August 28, 2023 22:14
@JonnyWong16 JonnyWong16 merged commit a6b6ebf into pkkid:master Aug 29, 2023
3 checks passed
@ReenigneArcher ReenigneArcher deleted the style-lint-all-python-files branch August 29, 2023 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants