-
-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pylintrc, flake8, pre-commit for Python scripts. Fix outstanding …
…warnings / errors. (#35) * Add .flake8 and pylintrc, and .pre-commit-config.yaml for enforcement * Fix code quality warnings (or ignore them) Mostly silly stuff, but a few important fixes * replace file() with open() (python 3+) * Catch a few renames that were missed in the rebranding from tilt_brush to open_brush * python3 style super() and class definitions * Tweak the keyring import slightly * There's a possible bug in bvh.py, when iterating and returning leafs. See the TODO * Replace some map()s with list and set comprehensions * Use utf-8 encoding for handling byte->str in git subprocess * Add rewritten Support/ThirdParty/GeneratedThirdPartyNotices.txt (different order) * Also add Support/bin to .pre-commit-config * Ignore duplicate-code * Also fix/ignore pylint and flake8 on Support/bin * Create main.yml
- Loading branch information
Showing
37 changed files
with
1,024 additions
and
858 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[flake8] | ||
extend-ignore = E111, E114, E501, E722, E121 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: pre-commit | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- uses: pre-commit/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.0.0 | ||
hooks: | ||
- id: flake8 | ||
files: ^Support/ | ||
- repo: https://github.com/PyCQA/pylint.git | ||
rev: pylint-2.6.0 | ||
hooks: | ||
- id: pylint | ||
name: pylint | ||
files: ^Support/ | ||
language_version: python3 | ||
args: | ||
- --load-plugins=pylint.extensions.redefined_variable_type,pylint.extensions.bad_builtin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[MESSAGES CONTROL] | ||
disable=bad-indentation,missing-class-docstring,missing-module-docstring,missing-function-docstring,invalid-name,fixme,line-too-long,duplicate-code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.