|
| 1 | +[tool.poetry] |
| 2 | +name = "{{{packageName}}}" |
| 3 | +version = "{{{packageVersion}}}" |
| 4 | +description = "{{{appName}}}" |
| 5 | +authors = ["{{infoName}}{{^infoName}}OpenAPI Generator Community{{/infoName}} <{{infoEmail}}{{^infoEmail}}team@openapitools.org{{/infoEmail}}>"] |
| 6 | +license = "{{{licenseInfo}}}{{^licenseInfo}}NoLicense{{/licenseInfo}}" |
| 7 | +readme = "README.md" |
| 8 | +repository = "https://{{{gitHost}}}/{{{gitUserId}}}/{{{gitRepoId}}}" |
| 9 | +keywords = ["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"] |
| 10 | +include = ["{{packageName}}/py.typed"] |
| 11 | + |
| 12 | +[tool.poetry.dependencies] |
| 13 | +python = "^3.8" |
| 14 | + |
| 15 | +urllib3 = ">= 1.25.3, < 3.0.0" |
| 16 | +python-dateutil = ">= 2.8.2" |
| 17 | +{{#asyncio}} |
| 18 | +aiohttp = ">= 3.8.4" |
| 19 | +aiohttp-retry = ">= 2.8.3" |
| 20 | +{{/asyncio}} |
| 21 | +{{#tornado}} |
| 22 | +tornado = ">=4.2, <5" |
| 23 | +{{/tornado}} |
| 24 | +{{#hasHttpSignatureMethods}} |
| 25 | +pem = ">= 19.3.0" |
| 26 | +pycryptodome = ">= 3.9.0" |
| 27 | +{{/hasHttpSignatureMethods}} |
| 28 | +pydantic = ">= 2" |
| 29 | +typing-extensions = ">= 4.7.1" |
| 30 | + |
| 31 | +[tool.poetry.dev-dependencies] |
| 32 | +pytest = ">= 7.2.1" |
| 33 | +pytest-cov = ">= 2.8.1" |
| 34 | +tox = ">= 3.9.0" |
| 35 | +flake8 = ">= 4.0.0" |
| 36 | +types-python-dateutil = ">= 2.8.19.14" |
| 37 | +mypy = ">= 1.5" |
| 38 | + |
| 39 | + |
| 40 | +[build-system] |
| 41 | +requires = ["setuptools"] |
| 42 | +build-backend = "setuptools.build_meta" |
| 43 | + |
| 44 | +[tool.pylint.'MESSAGES CONTROL'] |
| 45 | +extension-pkg-whitelist = "pydantic" |
| 46 | + |
| 47 | +[tool.mypy] |
| 48 | +files = [ |
| 49 | + "{{{packageName}}}", |
| 50 | + #"test", # auto-generated tests |
| 51 | + "tests", # hand-written tests |
| 52 | +] |
| 53 | +# TODO: enable "strict" once all these individual checks are passing |
| 54 | +# strict = true |
| 55 | + |
| 56 | +# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options |
| 57 | +warn_unused_configs = true |
| 58 | +warn_redundant_casts = true |
| 59 | +warn_unused_ignores = true |
| 60 | + |
| 61 | +## Getting these passing should be easy |
| 62 | +strict_equality = true |
| 63 | +extra_checks = true |
| 64 | + |
| 65 | +## Strongly recommend enabling this one as soon as you can |
| 66 | +check_untyped_defs = true |
| 67 | + |
| 68 | +## These shouldn't be too much additional work, but may be tricky to |
| 69 | +## get passing if you use a lot of untyped libraries |
| 70 | +disallow_subclassing_any = true |
| 71 | +disallow_untyped_decorators = true |
| 72 | +disallow_any_generics = true |
| 73 | + |
| 74 | +### These next few are various gradations of forcing use of type annotations |
| 75 | +#disallow_untyped_calls = true |
| 76 | +#disallow_incomplete_defs = true |
| 77 | +#disallow_untyped_defs = true |
| 78 | +# |
| 79 | +### This one isn't too hard to get passing, but return on investment is lower |
| 80 | +#no_implicit_reexport = true |
| 81 | +# |
| 82 | +### This one can be tricky to get passing if you use a lot of untyped libraries |
| 83 | +#warn_return_any = true |
| 84 | + |
| 85 | +[[tool.mypy.overrides]] |
| 86 | +module = [ |
| 87 | + "{{{packageName}}}.configuration", |
| 88 | +] |
| 89 | +warn_unused_ignores = true |
| 90 | +strict_equality = true |
| 91 | +extra_checks = true |
| 92 | +check_untyped_defs = true |
| 93 | +disallow_subclassing_any = true |
| 94 | +disallow_untyped_decorators = true |
| 95 | +disallow_any_generics = true |
| 96 | +disallow_untyped_calls = true |
| 97 | +disallow_incomplete_defs = true |
| 98 | +disallow_untyped_defs = true |
| 99 | +no_implicit_reexport = true |
| 100 | +warn_return_any = true |
0 commit comments