Skip to content

Commit

Permalink
Fix aiohttp.ClientTimeout type annotations to accept None for fields (#…
Browse files Browse the repository at this point in the history
…3511)

* Fix aiohttp.ClientTimeout type annotations to accept Nonefor fields

* Add changelog
  • Loading branch information
asvetlov authored Jan 9, 2019
1 parent c562ffe commit 7706b5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES/3511.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix ``aiohttp.ClientTimeout`` type annotations to accept ``None`` for fields
8 changes: 4 additions & 4 deletions aiohttp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@

@attr.s(frozen=True, slots=True)
class ClientTimeout:
total = attr.ib(type=float, default=None)
connect = attr.ib(type=float, default=None)
sock_read = attr.ib(type=float, default=None)
sock_connect = attr.ib(type=float, default=None)
total = attr.ib(type=Optional[float], default=None)
connect = attr.ib(type=Optional[float], default=None)
sock_read = attr.ib(type=Optional[float], default=None)
sock_connect = attr.ib(type=Optional[float], default=None)

# pool_queue_timeout = attr.ib(type=float, default=None)
# dns_resolution_timeout = attr.ib(type=float, default=None)
Expand Down

0 comments on commit 7706b5a

Please sign in to comment.