Skip to content

Commit

Permalink
Update template to support mypy compliance (#132)
Browse files Browse the repository at this point in the history
Co-authored-by: Andy-Grigg <Andy-Grigg@users.noreply.github.com>
  • Loading branch information
Andy-Grigg and Andy-Grigg authored Feb 15, 2024
1 parent 4b98d04 commit be96d23
Show file tree
Hide file tree
Showing 639 changed files with 17,983 additions and 9,898 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build_and_test_library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ jobs:

- name: "Test with pytest"
working-directory: ansys-grantami-serverapi-openapi
run: poetry run -- pytest
run: poetry run pytest

- name: "Run mypy"
working-directory: ansys-grantami-serverapi-openapi
run: poetry run mypy

build-library:
name: "Build library"
Expand Down
81 changes: 75 additions & 6 deletions ansys-grantami-serverapi-openapi/poetry.lock

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

23 changes: 20 additions & 3 deletions ansys-grantami-serverapi-openapi/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "ansys-grantami-serverapi-openapi"
description = "Autogenerated client library for the Granta MI Server API."
version = "3.0.0.dev183"
version = "3.0.0.dev187"
license = "MIT"
authors = ["ANSYS, Inc. <pyansys.core@ansys.com>"]
maintainers = ["ANSYS, Inc. <pyansys.core@ansys.com>"]
Expand All @@ -26,7 +26,8 @@ classifiers = [
"Topic :: Scientific/Engineering :: Information Analysis",
]
packages = [
{ include = "**/*.py", from = "src" }
{ include = "**/*.py", from = "src" },
{ include = "**/py.typed", from = "src" },
]

[tool.poetry.dependencies]
Expand All @@ -36,8 +37,9 @@ requests = "^2.26.0"
python-dateutil = "^2.8.2"

[tool.poetry.group.dev.dependencies]
pytest = "^7.0.0"
pytest = "^8.0.0"
requests-mock = "^1.0.0"
mypy = "^1.8.0"

[tool.tox]
legacy_tox_ini = """
Expand All @@ -59,3 +61,18 @@ changedir = {toxinidir}/tests
testpaths = [
"./tests",
]

[tool.mypy]
strict = true
warn_return_any = true
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
disallow_untyped_defs = true
no_implicit_optional = true
check_untyped_defs = true
show_error_codes = true
files = "src"
explicit_package_bases = true
mypy_path = "$MYPY_CONFIG_FILE_DIR/src"
namespace_packages = true
Loading

0 comments on commit be96d23

Please sign in to comment.