The DocApi.create_doc() method's docstring includes the wrong return type:
|
:return: Returns the result object. |
|
If the method is called asynchronously, |
|
returns the request thread. |
|
:rtype: str |
Similarly for DocApi.create_doc_with_http_info:
|
:return: Returns the result object. |
|
If the method is called asynchronously, |
|
returns the request thread. |
|
:rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) |
The correct return type here are bytes and tuple(bytes, status_code(int), headers(HTTPHeaderDict)), respectively.
Since Python 3, str is reserved for unicode strings, not the byte strings return by HTTP calls.
I know a picture isn't proof but absent a share environment, here's the best I can do.
Why does this matter?
It doesn't affect the working of the library, but it does anyone using any type checking or type hints, e.g. PyCharm below:

The
DocApi.create_doc()method's docstring includes the wrong return type:docraptor-python/docraptor/api/doc_api.py
Lines 203 to 206 in 92acc8d
Similarly for
DocApi.create_doc_with_http_info:docraptor-python/docraptor/api/doc_api.py
Lines 241 to 244 in 92acc8d
The correct return type here are
bytesandtuple(bytes, status_code(int), headers(HTTPHeaderDict)), respectively.Since Python 3,
stris reserved for unicode strings, not the byte strings return by HTTP calls.I know a picture isn't proof but absent a share environment, here's the best I can do.
Why does this matter?
It doesn't affect the working of the library, but it does anyone using any type checking or type hints, e.g. PyCharm below: