Skip to content

Commit

Permalink
feat(ci): add code formatter black
Browse files Browse the repository at this point in the history
  • Loading branch information
Iamhexi committed Sep 18, 2024
1 parent 098dc60 commit c1d8a22
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 20 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ jobs:
- name: Install the project dependencies
run: poetry install --all-extras

- name: Reformat with black
run: black .

- name: Run type checker
run: mypy
run: mypy --follow-imports=skip --check-untyped-defs .

- name: Run ruff linter
run: |
Expand All @@ -47,9 +50,5 @@ jobs:
run: |
pylint .
- name: Check tyes with mypy
run: |
mypy --follow-imports=skip --check-untyped-defs .
- name: Run the automated test
run: poetry run pytest -v
126 changes: 111 additions & 15 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ readme = "README.md"
python = "^3.12"
transformers = "^4.44.2"
torch = "^2.4.1"
black = "^24.8.0"

[tool.black]
line-length = 80
target-version = ['py312']
include = '\.py$'

[tool.poetry.group.test]

Expand Down

0 comments on commit c1d8a22

Please sign in to comment.