Skip to content

Update mobilenet.py #229

Update mobilenet.py

Update mobilenet.py #229

Workflow file for this run

name: Linter
on: [push, pull_request]
concurrency:
group: linter-${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow, github.event.pull_request.number) || github.workflow_ref }}
cancel-in-progress: true
jobs:
ruff-lint:
name: Ruff Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- uses: chartboost/ruff-action@v1
with:
args: 'check --select ASYNC,C90,DJ,DTZ,E,F,I,NPY,PD,PERF,PT,RUF,SIM,UP,W --ignore E501,F401 --output-format github --diff --exclude fl_client/migrations,fl_server/migrations'
ruff-fix:
name: Ruff Fixer
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- uses: chartboost/ruff-action@v1
with:
args: 'check --fix'
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'style fixes by ruff'
commit_options: '--no-verify --signoff'
skip_checkout: true
push_options: '--force'
branch: 'black'
flake8-lint:
runs-on: ubuntu-latest
name: Flake8
steps:
- name: Check out source repository
uses: actions/checkout@v4
- name: Set up Python environment
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'pip'
- name: flake8 Lint
uses: py-actions/[email protected]
with:
update-pip: "true"
exclude: "manage.py,fl_client/migrations,fl_server/migrations,settings.py"
ignore: "E501,F401,I900,S106,S311,TOR401,W503,W504"
max-line-length: "80"
plugins: "flake8-builtins flake8-commas flake8-errmsg flake8-fixme pep8-naming flake8-pie flake8-use-pathlib flake8-return flake8-type-checking flake8-todo flake8-tidy-imports flake8-bugbear flake8-django flake8-bandit TorchFix pandas-vet flake8-logging-format flake8-requirements"
dj-lint:
runs-on: ubuntu-latest
name: Django Lint
steps:
- name: Check out source repository
uses: actions/checkout@v4
- name: Set up Python environment
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'pip'
- name: DjLint Linter
run: |
python -m pip install --upgrade pip
pip install djlint
djlint ./templates --extension=html --lint
pylint:
name: PyLint
needs: [dj-lint,flake8-lint,ruff-lint]
strategy:
max-parallel: 15
matrix:
os: [macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-2019, windows-2022]
python-version: ["3.10", "3.11", "3.12"]
exclude:
- os: windows-2019
python-version: "3.10"
- os: windows-2022
python-version: "3.10"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: 'pip'
- name: Install dependencies
if: ${{ matrix.os == 'macos-12' || matrix.os == 'macos-13' || matrix.os == 'macos-14' }}
run: |
python -m pip install --upgrade pip
python -m pip install uv
python -m uv pip install pylint
python -m uv pip install git+https://github.com/pylint-dev/pylint-django.git
python -m uv pip install -r requirements.txt
- name: Install dependencies on Windows
if: ${{ matrix.os == 'windows-2019' || matrix.os == 'windows-2022' }}
run: |
python -m pip install --upgrade pip
python -m pip install uv
python -m uv pip install pylint
python -m uv pip install git+https://github.com/pylint-dev/pylint-django.git
python -m uv pip install -r requirements.txt
- name: Install dependencies on Ubuntu
if: ${{ matrix.os == 'ubuntu-20.04' || matrix.os == 'ubuntu-22.04' || matrix.os == 'ubuntu-24.04' }}
run: |
python -m pip install --upgrade pip
python -m pip install uv
python -m uv pip install pylint
python -m uv pip install git+https://github.com/pylint-dev/pylint-django.git
python -m uv pip install -r requirements.txt
- name: Analysing the code with pylint
run: pylint --load-plugins pylint_django --django-settings-module=lab.settings "**/*.py"