Adam Dangoor
59f612f514
Add hint for requests.models.Response.raw ( #12616 )
2024-09-04 12:15:53 +02:00
Adam Dangoor
ea34c97ccc
Expand docutils.parsters.rst.states ( #12226 )
2024-07-03 14:23:56 +02:00
Adam Dangoor and Alex Waygood
02d2f5f09e
Specify stream type of Docker logs ( #12214 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2024-07-02 18:47:47 +01:00
Adam Dangoor
712e4146ef
Allow users of docker run, create to not give name/version ( #12234 )
2024-06-28 13:29:20 +02:00
Adam Dangoor
ea869e2959
Add kwarg types to Docker container run and create ( #12216 )
2024-06-27 10:11:47 +02:00
Adam Dangoor
2d9b0fd2a0
Add Container wait return type at Docker model layer ( #12217 )
...
Also, improve type for the API layer. Previously, the type accounted for a 404 response. However, in the 404 case, a `docker.errors.NotFound` exception is raised.
2024-06-27 09:58:43 +02:00
Adam Dangoor
60443ca258
Add more keyword argument types for Docker pull ( #12210 )
2024-06-25 15:23:03 +02:00
Adam Dangoor
ff35709167
Add parameter types to docker.models.images.ImageCollection.build ( #12196 )
...
Introduce stubs-only module `docker._types`.
2024-06-25 14:18:21 +02:00
Adam Dangoor
1535e93674
Add return types to docker container run ( #12206 )
2024-06-25 14:04:48 +02:00
Adam Dangoor
da443145bc
Add more specific types to Docker network inspect/get equivalent methods ( #12188 )
2024-06-24 12:38:32 +02:00
Adam Dangoor
f66d687b08
Add types for container and net_id parameters in docker/api/network ( #12042 )
2024-06-24 11:31:02 +02:00
Adam Dangoor
c8898742e0
Add parameter types to docker's NetworkCollection create ( #12190 )
2024-06-24 11:28:24 +02:00
Adam Dangoor
8cdda79ae3
Add more precise types in docker.types.containers ( #12191 )
2024-06-24 11:27:57 +02:00
Adam Dangoor
5c3401a545
Use more specific types for Docker create_network ( #12187 )
2024-06-23 10:04:20 +02:00
Adam Dangoor
820447c57b
Add some types for Docker.api.network.NetworkApiMixing.create_network parameters ( #12156 )
...
See implementation at
https://github.com/docker/docker-py/blob/a3652028b1ead708bd9191efb286f909ba6c2a49/docker/api/network.py#L40
2024-06-20 00:15:54 -07:00
Adam Dangoor
1af9de664f
[docker] Add a number of types to docker.models.containers.Container ( #12077 )
2024-06-16 12:05:42 +02:00
Adam Dangoor
64af79f98b
[docker] Annotate Container.stop() ( #12052 )
2024-05-31 10:30:02 +02:00
Adam Dangoor
b2f6e5221b
Add types to docker.models.containers.Container.logs ( #12044 )
2024-05-28 13:55:18 +02:00
Adam Dangoor
41cc4f9ede
Add keyword argument types to docker.models.containers.Container.wait() ( #12037 )
2024-05-27 20:19:29 +03:00
Adam Dangoor
a9a52a0e10
Add return type for Docker Container wait ( #12036 )
2024-05-26 11:43:31 +02:00
Adam Dangoor
933444d1a8
Add types to parameters for Docker Network.disconnect ( #12007 )
2024-05-23 10:10:13 +02:00
Adam Dangoor
e1bb4edfe4
Add types for Docker client from_env kwargs ( #11989 )
2024-05-23 00:25:36 +02:00
Adam Dangoor
55b552121b
Fix type of Docker BuildError.build_log ( #11917 )
...
In working this out I also had a go at changing the json_stream
functions used to create every BuildError in docker-py.
There are two `BuildError`s raised in docker-py, both in
https://github.com/docker/docker-py/blob/b6464dbed92b14b2c61d5ee49805fce041a3e083/docker/models/images.py#L304-L315
```python
result_stream, internal_stream = itertools.tee(json_stream(resp))
for chunk in internal_stream:
if 'error' in chunk:
raise BuildError(chunk['error'], result_stream)
if 'stream' in chunk:
match = re.search(
r'(^Successfully built |sha256:)([0-9a-f]+)$',
chunk['stream']
)
if match:
image_id = match.group(2)
last_event = chunk
if image_id:
return (self.get(image_id), result_stream)
raise BuildError(last_event or 'Unknown', result_stream)
```
2024-05-18 08:26:17 -04:00
Adam Dangoor
a9d7e861f7
Add a number of types to docker.models.containers ( #11912 )
2024-05-14 11:15:32 +02:00
Adam Dangoor
0382803c4c
Add many types to docker.api.container ( #11911 )
2024-05-12 13:58:56 -07:00
Adam Dangoor
a4c4076b61
Add types to all "container" parameters in docker.api.container ( #11908 )
2024-05-12 18:07:48 +02:00
Adam Dangoor
96697a835b
Add remaining parameter types to docker.api.container logs ( #11907 )
2024-05-12 17:12:32 +02:00
Adam Dangoor
932311d441
Add return type to Docker Container.logs ( #11888 )
2024-05-12 13:39:18 +02:00
Adam Dangoor
488bc24c43
Add return type for Docker container start ( #11905 )
2024-05-12 13:37:00 +02:00
Adam Dangoor
bbad7f2f24
Fix "tail" parameter type for Docker container logs ( #11906 )
2024-05-12 13:09:47 +02:00
Adam Dangoor
f75211b801
Allow Image type for docker container run image parameter ( #11900 )
2024-05-12 12:14:06 +02:00
Adam Dangoor
9174db0d7d
Add some types to Docker ContainerCollection parameters ( #11857 )
2024-05-10 10:08:47 +02:00
Adam Dangoor
727f3c4320
Add return type to Docker Container.stop ( #11869 )
...
We can see at
https://github.com/docker/docker-py/blob/b6464dbed92b14b2c61d5ee49805fce041a3e083/docker/models/containers.py#L452
that this returns the return value of `self.client.api.stop`.
We can see at
https://github.com/docker/docker-py/blob/b6464dbed92b14b2c61d5ee49805fce041a3e083/docker/api/container.py#L1187
that this returns None.
2024-05-06 11:05:43 +02:00
Adam Dangoor
113b2ccd42
Add return type to Docker Container.remove ( #11868 )
2024-05-06 11:01:55 +02:00
Adam Dangoor
5883898b0a
[docker-py] Add return type for building a Docker image ( #11851 )
2024-05-02 10:08:32 +02:00
Adam Dangoor
4a33b2f3a0
Add some types for xml.dom.minidom.Text ( #11725 )
2024-04-06 14:45:24 +02:00
Adam Dangoor
9d2f651818
Add annotations to docutils.parsers.rst.directives.parts ( #11667 )
2024-03-30 09:10:41 +01:00
Adam Dangoor
26452a7c68
Add docutils.nodes.system_message and .BackLinkable
...
Add stubs for docutils.nodes.system_message and docutils.nodes.BackLinkable
2024-01-25 11:27:10 +01:00
Adam Dangoor
ce45bc3a1c
Ad docutils.nodes.raw and docutils.nodes.Inline ( #11312 )
2024-01-25 11:25:38 +01:00
Adam Dangoor
289c3f79b0
Add type stubs for docutils.nodes.literal_block and docutils.nodes.Fi… ( #11308 )
2024-01-24 15:36:18 +01:00
Adam Dangoor
b96d40a16c
Add substitution_defs to docutils.nodes.document ( #11307 )
2024-01-24 15:21:53 +01:00
Adam Dangoor
d689b486c0
Add parameter type to PreparedRequest.prepare_content_length ( #11304 )
2024-01-24 13:41:27 +01:00
Adam Dangoor
b6d121600e
Add a number of properties to PIL.ImageStat.Stat ( #11303 )
2024-01-24 13:39:05 +01:00
Adam Dangoor
ced150a7e8
Add types to urllib3.filepost stubs ( #9924 )
2023-03-26 15:15:36 +01:00
Adam Dangoor
19368ab964
Add type to requests.models.RequestEncodingMixin.path_url ( #9923 )
...
We can see at https://github.com/psf/requests/blob/7f694b79e114c06fac5ec06019cada5a61e5570f/requests/models.py#L104 that this always returns a string.
2023-03-22 19:20:40 +00:00
Adam Dangoor
b9c81fe2f0
Add some return type hints for methods of Werkzeug's EnvironBuilder c… ( #4653 )
2020-10-12 13:47:54 +02:00
Adam Dangoor
ec62f5f772
Allow Flask.Response.default_mimetype to be None ( #4563 )
2020-09-21 14:36:05 +02:00
Adam Dangoor
45a11b974e
Update parse_multipart return type to support Python 3.7 ( #2474 )
...
* Add encoding and errors parameters to cgi.parse_multipart stub.
2018-09-27 22:19:02 +02:00
Adam Dangoor
7fe417ca58
In Python 3.4 and above, os.makedirs and os.removedirs use the kwarg "name" rather than "path" ( #1536 )
2017-08-08 18:42:29 -07:00