Skip to content

Commit

Permalink
chore: add more mypy ignores (#23)
Browse files Browse the repository at this point in the history
* chore: add more mypy ignores

* chore: fix pip audit issues

* chore: patching 3.12 tests

* chore: temporary hotfixing setuptools 3.12 bug

---------

Co-authored-by: Altynbek Orumbayev <altynbek.orumbayev@makerx.com.au>
  • Loading branch information
neilcampbell and aorumbayev authored Mar 27, 2024
1 parent 5346181 commit 538cd17
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 40 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ jobs:
strategy:
matrix:
os: ["ubuntu-latest"]
python: ["3.10", "3.11", "3.12"]
# TODO: fix setuptools bug in 3.12, steps to reproduce (add 3.12 below)
python: ["3.10", "3.11"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source code
Expand Down
2 changes: 1 addition & 1 deletion examples/helloworld/client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# flake8: noqa
# fmt: off
# mypy: disable-error-code="no-any-return, no-untyped-call"
# mypy: disable-error-code="no-any-return, no-untyped-call, misc, type-arg"
# This file was automatically generated by algokit-client-generator.
# DO NOT MODIFY IT BY HAND.
# requires: algokit-utils@^1.2.0
Expand Down
2 changes: 1 addition & 1 deletion examples/lifecycle/client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# flake8: noqa
# fmt: off
# mypy: disable-error-code="no-any-return, no-untyped-call"
# mypy: disable-error-code="no-any-return, no-untyped-call, misc, type-arg"
# This file was automatically generated by algokit-client-generator.
# DO NOT MODIFY IT BY HAND.
# requires: algokit-utils@^1.2.0
Expand Down
2 changes: 1 addition & 1 deletion examples/state/client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# flake8: noqa
# fmt: off
# mypy: disable-error-code="no-any-return, no-untyped-call"
# mypy: disable-error-code="no-any-return, no-untyped-call, misc, type-arg"
# This file was automatically generated by algokit-client-generator.
# DO NOT MODIFY IT BY HAND.
# requires: algokit-utils@^1.2.0
Expand Down
2 changes: 1 addition & 1 deletion examples/voting/client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# flake8: noqa
# fmt: off
# mypy: disable-error-code="no-any-return, no-untyped-call"
# mypy: disable-error-code="no-any-return, no-untyped-call, misc, type-arg"
# This file was automatically generated by algokit-client-generator.
# DO NOT MODIFY IT BY HAND.
# requires: algokit-utils@^1.2.0
Expand Down
78 changes: 44 additions & 34 deletions poetry.lock

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

2 changes: 1 addition & 1 deletion src/algokit_client_generator/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def generated_comment(context: GenerateContext) -> DocumentParts:
def disable_linting(context: GenerateContext) -> DocumentParts:
yield "# flake8: noqa" # this works for flake8 and ruff
yield "# fmt: off" # disable formatting
yield '# mypy: disable-error-code="no-any-return, no-untyped-call"' # disable common type warnings
yield '# mypy: disable-error-code="no-any-return, no-untyped-call, misc, type-arg"' # disable common type warnings


def imports(context: GenerateContext) -> DocumentParts:
Expand Down

1 comment on commit 538cd17

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/algokit_client_generator
   __main__.py220%1–3
   cli.py47470%1–81
   document.py82890%44, 47, 49–50, 55, 69, 74–75
   generator.py463699%22, 119, 265, 817, 991, 1006
   utils.py1081289%24, 41–42, 44, 46, 48, 50, 52, 55–56, 82, 111
TOTAL8347591% 

Tests Skipped Failures Errors Time
40 0 💤 0 ❌ 0 🔥 18.973s ⏱️

Please sign in to comment.