Skip to content

Commit

Permalink
Merge pull request #26 from jandom/jandom/ci/setup-mypy-for-the-repo
Browse files Browse the repository at this point in the history
ci: setup mypy for the repo
  • Loading branch information
Eric-Canas authored Jun 15, 2024
2 parents 3f39fc1 + 0349e25 commit ccc7233
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,20 @@ jobs:
- name: Run isort
run: |-
isort --check-only --profile black .
mypy:
name: Run mypy
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x' # Specify the Python version you are using
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
- name: Run mypy
run: |-
mypy --install-types --non-interactive qreader.py
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ dist/
qreader.egg-info/
__pycache__/
testset/
venv/
build/
6 changes: 3 additions & 3 deletions qreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ class DecodeQRResult:

def wrap(
scale_factor: float,
corrections: str,
flavor: str,
blur_kernel_sizes: tuple[tuple[int, int]],
corrections: typing.Literal["cropped_bbox", "corrected_perspective"],
flavor: typing.Literal["original", "inverted", "grayscale"],
blur_kernel_sizes: tuple[tuple[int, int], ...] | None,
image: np.ndarray,
results: typing.List[Decoded],
) -> list[DecodeQRResult]:
Expand Down

0 comments on commit ccc7233

Please sign in to comment.