Skip to content

Commit

Permalink
CI: Add code linters
Browse files Browse the repository at this point in the history
This adds mypy & darker (black) to GitHub Actions. These will fail because
the code lacks type annotations and doesn't follow the latest code style
guidelines yet.
  • Loading branch information
SchoolGuy committed Dec 5, 2022
1 parent 0c22384 commit e23e130
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/linters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,29 @@ on:
- '**.py'

jobs:
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- run: pip install mypy
- run: pip install types-cryptography types-urllib3
- run: pip install distro keyring progressbar zstandard
- run: mypy osc

darker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
- uses: akaihola/darker@1.5.1
with:
options: "--check --diff --color --line-length=120"
src: "."
version: "1.5.1"

pylint_plugins:
name: 'Diff pylint runs on osc plugin'
runs-on: 'ubuntu-latest'
Expand Down

0 comments on commit e23e130

Please sign in to comment.