Skip to content

Commit

Permalink
add code style checking
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunsi committed Mar 16, 2024
1 parent 5df8c3a commit 67ae897
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Code Style

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]


jobs:
isort:
name: isort
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install Dependencies
run: pip3 install isort
- name: Run isort
run: 'isort --check service *.py'
black:
name: black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install Dependencies
run: pip3 install black
- name: Run black
run: 'black --check service *.py'
2 changes: 1 addition & 1 deletion hafas_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def notes(self):
if note["type"].upper() in ("R",):
notes.append(note["value"])
if notes:
return ' | '.join(notes)
return " | ".join(notes)
return None

@property
Expand Down

0 comments on commit 67ae897

Please sign in to comment.