Skip to content

Commit

Permalink
[3.5] Fix aiohttp.ClientTimeout type annotations to accept None for f…
Browse files Browse the repository at this point in the history
…ields (#3511) (#3513)

* Fix aiohttp.ClientTimeout type annotations to accept Nonefor fields

* Add changelog
(cherry picked from commit 7706b5a)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
  • Loading branch information
asvetlov authored Jan 9, 2019
1 parent 4cf36a3 commit 4cf59e5
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 @@ -130,10 +130,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 4cf59e5

Please sign in to comment.