style: delete useless token = token_pass() #388
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
name: lint-changed-files | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
workflow_dispatch: {} | |
pull_request: | |
branches: | |
- main | |
- develop | |
jobs: | |
lint: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install black | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/[email protected] | |
- name: List all changed files and lint them | |
run: | | |
for file in ${{ steps.changed-files.outputs.all_changed_files }} ; do | |
# check if file is python file | |
if [[ ${file} == *.py ]]; then | |
black --check ${file} | |
fi | |
done |