William Cheng
a5f79a7bdc
[python] Update github workflow, use debug instead of warning ( #16565 )
...
* update github workflow, use debug instead of warning
* use debug instead of warn
2023-09-12 16:55:53 +08:00
William Cheng
dee536f7f7
import Annotated if needed ( #16521 )
2023-09-07 14:36:45 +08:00
jessemyers-lettuce
b34a10aee7
python: ignore long lines for model descriptions ( #16518 )
...
Descriptions can easily exceed line-length limits because they are often
extracted from doc/comments strings, which may use unexpected formatting.
Python doc strings, in particular, are likely to use newlines, which mustache
does not preserve, causing descriptions to be condensed to a single line.
2023-09-06 10:48:43 +08:00
jessemyers-lettuce
1b32088c2d
python: use isinstance instead of type() ( #16516 )
...
Use of `isinstance` is preferred (and validated by common linters).
2023-09-05 23:45:18 +08:00
William Cheng
a2177570b3
update python samples
2023-09-02 01:07:33 +08:00
jessemyers-lettuce
40731ed52d
python: several typing and style improvements ( #16378 )
...
* python: several typing and style improvements
The generated (python) code fails with several standard validation tools,
including `flake8`, `mypy`, and `autoflake`. While fixing every possible
violation -- especially wrto typing -- woudl be a project, some of the
changes are fairly easy.
- The `autoflake` tool picks up on unused imports. These can just be removed.
- The `mypy` tool picks up on numerious typing violations, especially if set
to its strictest mode. As a starting point, all functions ought to annotate
a return type, including constructors, even if the return type is `None`
because otherwise the functions are omitted from type checking and it's
impossible to make incremental progress towards adding types.
- The `flake8` tool mostly finds whitespace and line-length issues; while
line-length standards very, the source already includes several flake8
ignores, so it seems safe to add a few more.
* Add generated files
* Restore imports used by `AbstractPythonCodegen.java`
* Update generated files
2023-09-02 01:03:02 +08:00
Davy Durham
4a1c70f2f1
fix: python client generator didn't respect range response specification ( #16451 )
...
* bug: python client generator didn't respect range response specification (e.g. "1XX", "2XX", etx.). Return values tended to become None as a result
* update samples
---------
Co-authored-by: William Cheng <wing328hk@gmail.com>
2023-08-31 10:15:30 +08:00
William Cheng
b457c3de70
fix uuid example cast exception in python generators ( #16432 )
2023-08-29 13:34:54 +08:00
William Cheng
80121aa88f
Prepare v7.0.1 ( #16409 )
...
* prepare 7.0.1 in master
* update doc
2023-08-25 16:11:29 +08:00
William Cheng
fd12bb3508
[python] Fix data type ( #16291 )
...
* fix data type in python client codegen
* add model mapping feature
2023-08-10 23:05:35 +08:00
ふぁ
f3b930c48c
[python-nextgen] Fix noqa: E501
position ( #16280 )
...
* Fix `noqa: E501` position
Signed-off-by: ふぁ <yuki@yuki0311.com>
* [python-nextgen] update samples
Signed-off-by: ふぁ <yuki@yuki0311.com>
---------
Signed-off-by: ふぁ <yuki@yuki0311.com>
2023-08-08 20:42:12 +08:00
William Cheng
f6fb83878b
[Default] update isAdditionalPropertiesTrue tag to cover more types ( #16227 )
...
* enhance additional properties support
* update samples
* update tests
* add more tests
* update samples
* fix samples
2023-08-05 13:32:43 +08:00
William Cheng
3278eea9a4
Add tests for #16217 ( #16221 )
...
* add tests for #16217
* add new files
2023-07-31 11:03:36 +08:00
ふぁ
77311c3d76
[python-nextgen] Fix allOf missing imports ( #16217 )
...
* [python-nextgen] fix allOf missing imports
Signed-off-by: ふぁ <yuki@yuki0311.com>
* [python-nextgen] update samples
Signed-off-by: ふぁ <yuki@yuki0311.com>
* [python-nextgen] remove circular import
Signed-off-by: ふぁ <yuki@yuki0311.com>
* [python-nextgen] Fix circular refs
Signed-off-by: ふぁ <yuki@yuki0311.com>
---------
Signed-off-by: ふぁ <yuki@yuki0311.com>
2023-07-31 10:04:53 +08:00
ふぁ
48ff57b4f6
[python-nextgen] fix #16010 circular refs lead to no imports ( #16199 )
...
* [python-nextgen] fix #16010 circular refs lead to no imports
Signed-off-by: ふぁ <yuki@yuki0311.com>
* [python-nextgen] update samples
Signed-off-by: ふぁ <yuki@yuki0311.com>
* [python-nextgen] remove unnecessary Postponed annotations
Signed-off-by: ふぁ <yuki@yuki0311.com>
* [python-nextgen] update samples
Signed-off-by: ふぁ <yuki@yuki0311.com>
* [python-nextgen] remove unnecessary Postponed annotations
Signed-off-by: ふぁ <yuki@yuki0311.com>
* [python-nextgen] update samples
Signed-off-by: ふぁ <yuki@yuki0311.com>
* [python-nextgen] update samples
Signed-off-by: ふぁ <yuki@yuki0311.com>
---------
Signed-off-by: ふぁ <yuki@yuki0311.com>
2023-07-30 00:42:46 +08:00
William Cheng
d41fe12c1f
[python] Add tests for simple object with additional properties ( #16218 )
...
* add tests for simple object without additional properties
* update logic
2023-07-29 11:43:37 +08:00
ふぁ
d9fc039dcf
[python-nextgen] fix #16151 Disallow additional properties if not present - missing Any and Dict import ( #16208 )
...
* [python-nextgen] fix #16151 Disallow additional properties if not present - missing Any and Dict import
Signed-off-by: ふぁ <yuki@yuki0311.com>
* [python-nextgen] update samples
Signed-off-by: ふぁ <yuki@yuki0311.com>
* [python-nextgen] remove unwanted imports
Signed-off-by: ふぁ <yuki@yuki0311.com>
* [python-nextgen] update samples
Signed-off-by: ふぁ <yuki@yuki0311.com>
* [python-nextgen] remove unwanted imports
Signed-off-by: ふぁ <yuki@yuki0311.com>
* [python-nextgen] update samples
Signed-off-by: ふぁ <yuki@yuki0311.com>
---------
Signed-off-by: ふぁ <yuki@yuki0311.com>
2023-07-29 10:51:28 +08:00
ふぁ
e411b2ac0a
[python-nextgen] Add type to actual instance ( #16204 )
...
* [python-nextgen] add type to actual_instance
Signed-off-by: ふぁ <yuki@yuki0311.com>
* [python-nextgen] update samples
Signed-off-by: ふぁ <yuki@yuki0311.com>
* [python-nextgen] fixed unnecessary type conversions
Signed-off-by: ふぁ <yuki@yuki0311.com>
* [python-nextgen] update samples
Signed-off-by: ふぁ <yuki@yuki0311.com>
---------
Signed-off-by: ふぁ <yuki@yuki0311.com>
2023-07-29 10:08:06 +08:00
William Cheng
7dee666826
add python name mapping support ( #16120 )
2023-07-20 17:30:01 +08:00
William Cheng
08c3f8973e
[python] Fix array of array of model's to_dict, from_dict ( #16032 )
...
* fix array of array of model's to_dict, from_dict
* update samples
2023-07-08 14:12:42 +08:00
William Cheng
b42234eb3c
[python] Fix map of array in property ( #15844 )
...
* fix map of array in property (python)
* update samples
2023-06-15 11:50:56 +08:00
William Cheng
d2e10a7229
install urllib3 < 2.1.0 ( #15810 )
2023-06-12 15:58:51 +08:00
William Cheng
6788f43af0
Better handling of Inline schema ( #15682 )
...
* skip allOf inline subschema created as $ref
* add option for fallback
* add back atleastonemodel
* add log
* update java, kotlin, js samples
* update tests
* fix native client test
* fix java client errors by regenerating test files
* clean up python
* clean up powershell
* clean up php
* clean up ruby
* update erlang, elixir
* update dart samples
* update ts samples
* update r, go samples
* update perl
* update swift
* add back files
* add back files
* remove outdated test files
* fix test
2023-06-11 15:35:58 +08:00
William Cheng
21748e024a
add py.typed ( #15804 )
2023-06-10 21:48:54 +08:00
William Cheng
1fb0ab997f
[Python] fix access_token set to None when constructing Configuration object ( #15802 )
...
* clean up files
* add tests for access_token
* fix bug with access_token
* update test method name
2023-06-10 19:22:02 +08:00
gyoganathan
fc474eab5f
Added BadRequestException as a subclass in python ( #15722 )
...
Co-authored-by: Gomathi Yoganathan <gyoganathan@C02G45FPMD6R.corp.proofpoint.com>
2023-06-10 15:27:18 +08:00
Tiffany Marrel
c2f635a330
fix use of isBasic and isBasicBasic and isBasicBearer and isHttpSignature in documentation ( #15443 )
...
* [ada] fix use of isBasic condition
* [apex] fix use of isBasic condition
* [asciidoc] fix use of isBasic condition
* [python] fix use of isBasic condition
* [csharp C#] fix use of isBasic condition
* [htmlDocs] fix use of isBasic condition
* [Ruby] fix use of isBasic condition
* [scala] fix use of isBasic condition
* [julia] fix use of isBasic condition
* [Objective-C objc] fix use of isBasic condition
* [GraphQL] fix use of isBasic condition
* [MarkDown] fix use of isBasic condition
2023-06-01 09:47:00 +08:00
William Cheng
48ef91acc4
[python] Add test for nullable property with pattern ( #15625 )
...
* add test for nullable property with pattern
* update samples
2023-05-24 15:13:53 +08:00
William Cheng
01ed5975e1
rename python-nextgen to python ( #15504 )
2023-05-16 13:54:07 +08:00