Skip to content

Commit

Permalink
Add python typechecking/linting with mypy, pyflakes, and black
Browse files Browse the repository at this point in the history
  • Loading branch information
wingdeans committed Jul 17, 2022
1 parent 64eaacc commit 02acdba
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,23 @@ jobs:
uses: actions/checkout@v3
- name: REUSE compliance check
uses: fsfe/reuse-action@v1

python:
runs-on: ubuntu-latest
steps:
- name: Checkout rz-bindgen
uses: actions/checkout@v3
- name: Install tools
run: |
pip install mypy pyflakes black
- name: Run mypy
run: |
mypy src/main.py
if: ${{ always() }}
- name: Run pyflakes
run: |
pyflakes src/*.py
if: ${{ always() }}
- name: Run black
run: |
black --check --diff src/*.py
1 change: 0 additions & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@
cons_h,
typedef="RzCons",
rename_fields={
"flush": "_flush",
"lastline": "_lastline",
"echo": "_echo",
"highlight": "_highlight",
Expand Down
1 change: 0 additions & 1 deletion src/module_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from typing import List, Dict, Optional

from clang.wrapper import (
Cursor,
CursorKind,
Struct,
StructField,
Expand Down

0 comments on commit 02acdba

Please sign in to comment.