Skip to content

Commit 9486ed9

Browse files
committed
fix: update flake8
2 parents de7b307 + 9211eed commit 9486ed9

File tree

3 files changed

+56
-10
lines changed

3 files changed

+56
-10
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Description
2+
3+
<!-- Please include a summary of the issue.-->
4+
5+
## Type of issue
6+
7+
- [ ] Feature (New Script)
8+
- [ ] Bug
9+
- [ ] Documentation
10+
11+
## Checklist:
12+
13+
- [ ] I have read the project guidelines.
14+
- [ ] I have checked all the existing projects, before submitting a new project issue.
15+
- [ ] I have checked previous issues to avoid duplicates.
16+
- [ ] This issue will be meaningful for the project.
17+
18+
19+
<!-- Uncomment this in case you have a issue related to a bug in existing code.-->
20+
21+
<!--
22+
- [ ] I have added screenshots of the bug
23+
- [ ] I have added steps to reproduce the bug
24+
- [ ] I have proposed a possible solution for the bug
25+
-->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Description
2+
3+
A short summary of what is included in your Pull Request.
4+
5+
Fixes #(issue_no)
6+
7+
Replace `issue_no` in the above line, with the issue related to this PR.
8+
9+
## Type of change
10+
11+
Choosing one or more options from the following as per the nature of your Pull request.
12+
13+
- [ ] Bug fix (non-breaking change which fixes an issue)
14+
- [ ] New feature (non-breaking change which adds functionality)
15+
- [ ] Documentation Update
16+
17+
# Checklist:
18+
Please tick all the boxes that are fulfilled by your Pull Request.
19+
20+
- [ ] I have named my files and folder, according to this project's guidelines.
21+
- [ ] My code follows the style guidelines of this project.
22+
- [ ] My Pull Request has a descriptive title. (not a vague title like `Update index.md`)
23+
- [ ] I have commented on my code, particularly in hard-to-understand areas.
24+
- [ ] I have created a helpful and easy to understand `README.md`, according to the given [`README_TEMPLATE.`](https://github.com/chavarera/python-mini-projects/blob/master/README_TEMPLATE.md)
25+
- [ ] I have included a requirements.txt file (if external libraries are required.)
26+
- [ ] My changes do not produce any warnings.
27+
- [ ] I have added a working sample/screenshot of the script.

.github/workflows/python-app.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
uses: actions/setup-python@v5
2222
with:
2323
python-version: "3.10"
24-
cache: pip
2524

2625
- name: Install Dependencies
2726
run: |
@@ -31,12 +30,7 @@ jobs:
3130
- name: Linting with flake8
3231
run: |
3332
pip install flake8
34-
# find only changed *.py files compared to main
35-
CHANGED_FILES=$(git diff --name-only origin/main...HEAD -- '*.py')
36-
if [ -n "$CHANGED_FILES" ]; then
37-
echo "Running flake8 on changed files:"
38-
echo "$CHANGED_FILES"
39-
flake8 $CHANGED_FILES
40-
else
41-
echo "No Python files changed."
42-
fi
33+
# stop the build if there are Python syntax errors or undefined names
34+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
35+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
36+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

0 commit comments

Comments
 (0)