-
Notifications
You must be signed in to change notification settings - Fork 33
Maintainability upgrades and fixes #399
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
base: develop
Are you sure you want to change the base?
Changes from 7 commits
bb9d0df
572236c
b54b709
072b949
1bba206
91f4cec
ab44b1c
87c49a8
d4ef4da
2974b9a
6aedd5b
1f388ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
node_modules/ | ||
.github/ | ||
.mypy_cache/ | ||
.pytest_cache/ | ||
__pycache__/ | ||
*.pyc | ||
.venv/ | ||
.scannerwork/ | ||
.ruff_cache/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Format App | ||
|
||
on: | ||
push: | ||
branches: [master, develop] | ||
|
||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install ruff | ||
run: pip install ruff | ||
|
||
- name: Run ruff format | ||
run: ruff format packet | ||
|
||
- name: Commit and push changes | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git add . | ||
git diff --cached --quiet || git commit -m "Auto-format code with ruff" | ||
git push |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,11 +27,11 @@ jobs: | |
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Lint with pylint | ||
python -m pip install uv | ||
if [ -f requirements.txt ]; then uv pip install -r requirements.txt --system; fi | ||
- name: Lint with ruff | ||
run: | | ||
pylint packet/routes packet | ||
ruff check packet | ||
|
||
|
||
typecheck: | ||
runs-on: ubuntu-latest | ||
|
@@ -50,8 +50,8 @@ jobs: | |
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
python -m pip install uv | ||
if [ -f requirements.txt ]; then uv pip install -r requirements.txt --system; fi | ||
- name: Typecheck with mypy | ||
run: | | ||
# Disabled error codes to discard errors from imports | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
const gulp = require('gulp'); | ||
const exec = require('child_process').exec; | ||
|
||
let pylintTask = (cb) => { | ||
exec('pylint --load-plugins pylint_quotes packet/routes packet', function (err, stdout, stderr) { | ||
let ruffTask = (cb) => { | ||
exec('ruff check packet', function (err, stdout, stderr) { | ||
console.log(stdout); | ||
console.log(stderr); | ||
cb(err); | ||
}); | ||
}; | ||
|
||
gulp.task('pylint', pylintTask); | ||
gulp.task('ruff', ruffTask); |
Uh oh!
There was an error while loading. Please reload this page.