forked from AUTOMATIC1111/stable-diffusion-webui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic Pylint to catch syntax errors on PRs
- Loading branch information
1 parent
eef3bc6
commit d3ffc96
Showing
2 changed files
with
39 additions
and
0 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,36 @@ | ||
# See https://github.com/actions/starter-workflows/blob/1067f16ad8a1eac328834e4b0ae24f7d206f810d/ci/pylint.yml for original reference file | ||
name: Run Linting/Formatting on Pull Requests | ||
|
||
on: | ||
- push | ||
- pull_request | ||
# See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpull_requestpull_request_targetbranchesbranches-ignore for syntax docs | ||
# if you want to filter out branches, delete the `- pull_request` and uncomment these lines : | ||
# pull_request: | ||
# branches: | ||
# - master | ||
# branches-ignore: | ||
# - development | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.10.6 | ||
- name: Install PyLint | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pylint | ||
# This lets PyLint check to see if it can resolve imports | ||
- name: Install dependencies | ||
run : | | ||
export COMMANDLINE_ARGS="--skip-torch-cuda-test --exit" | ||
python launch.py | ||
- name: Analysing the code with pylint | ||
run: | | ||
pylint $(git ls-files '*.py') |
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,3 @@ | ||
# See https://pylint.pycqa.org/en/latest/user_guide/messages/message_control.html | ||
[MESSAGES CONTROL] | ||
disable=C,R,W,E,I |