Skip to content

Commit

Permalink
Update lint_check.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
guojihu-hana authored Jul 30, 2024
1 parent ca34def commit 113b0d2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/lint_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
pull_request:
branches:
- "main"
- "develop"

jobs:
# lint check can be auto-executed by the workflow
Expand All @@ -18,25 +17,25 @@ jobs:
run: |
pip install flake8==v3.8.4
FLAKE_DISABLE_LIST="F403,F405,W504,W503,E203"
flake8 --max-line-length=120 --ignore=$FLAKE_DISABLE_LIST ./internlm/*
flake8 --max-line-length=120 --ignore=$FLAKE_DISABLE_LIST ./examples/*
flake8 --max-line-length=120 --ignore=$FLAKE_DISABLE_LIST ./train.py
- name: lint-isort
run: |
pip install isort==5.12.0
isort --check --profile=black ./internlm/*
isort --check --profile=black ./examples/*
isort --check --profile=black ./train.py
- name: lint-black
run: |
pip install black==22.8.0
BLACK_EXCLUDE_SETTINGS='\.venv/|\.local/|\.cache/|\.git/'
black --line-length=120 --check --exclude $BLACK_EXCLUDE_SETTINGS ./internlm/*
black --line-length=120 --check --exclude $BLACK_EXCLUDE_SETTINGS ./examples/*
black --line-length=120 --check --exclude $BLACK_EXCLUDE_SETTINGS ./train.py
- name: lint-pylint
run: |
pip install pylint==v2.17.2
PYLINT_DISABLE_LIST="C0114,C0415,W0212,W0235,W0238,W0621,C0103,R1735,C2801,E0402,C0412,W0719,R1728,W1514,W0718,W0105,W0707,C0209,W0703,W1203"
pylint --rcfile .pylintrc --disable=$PYLINT_DISABLE_LIST ./internlm/*
pylint --rcfile .pylintrc --disable=$PYLINT_DISABLE_LIST ./examples/*
pylint --rcfile .pylintrc --disable=$PYLINT_DISABLE_LIST ./train.py

0 comments on commit 113b0d2

Please sign in to comment.