3 Commits

Author SHA1 Message Date
Roi Shacham
406bc28a3d
Fix parameters_to_url_query doesn't properly convert lists to string (#17592)
* fix parameters_to_url_query to properly handle lists

* fix query parameters bug in sample clients

* add tests for url query list value

* build project

* tests fix

* Revert "build project"

This reverts commit a486a6de7528302db92c36e64dcd20d41ada51b9.
2024-01-13 11:36:01 +08:00
Jonathan Ballet
df7976c1a3
python: enable more mypy checks 1/n (#17556)
* python: more mypy checks

* mypy: check_untyped_defs

* mypy: disallow_subclassing_any

* mypy: disallow_untyped_decorators

* mypy: disallow_any_generics
2024-01-09 16:45:05 +08:00
Jonathan Ballet
22a0fc1727
python: adjust basic typing information (#17511)
* python: adjust basic typing information

This is an initial pass to fix and adjust the typing information for the
generated client. This is enough to have mypy runnning without complains
on all the (modern) generated clients (Pydantic v1 code is not checked
for instance)

mypy is also now run directly in the CI, so further changes will also be
checked and thus, will need to be compliant with good typing
information.

Note that this doesn't *fully* type all the code: mypy is not run in
"strict" mode and there are still many functions/methods/attributes
which are still not fully typed, but it's a first good step in that
direction.

* ApiResponse's raw_data can't be None

* Fix indentation

* Revert test changes

* run mypy on tests/ directory

* don't forcefully convert the client response headers to dict

* override petstore ApiResponse model

* adjust type of 'any/one_of_schemas' fields
2024-01-06 15:40:42 +08:00