Enable lint on CI and update deps (#2067)

* Fix black an isort

* change bootstrap_gen to use a list instead of dict

* Bunch of updates

* Fix build

* fix lint

* Fix docs

* Fix lint

* More fixes

* Fix lint

* fix stupid mistake

---------

Co-authored-by: Christian Hartung <christian.hartung@olist.com>
This commit is contained in:
Srikanth Chekuri
2023-11-21 13:55:11 +05:30
committed by GitHub
parent 9afaf26b3a
commit 5888d4ef95
69 changed files with 343 additions and 323 deletions

View File

@ -78,7 +78,7 @@ def trysetip(conn: http.client.HTTPConnection, loglevel=logging.DEBUG) -> bool:
state = _getstate()
if not state:
return True
spanlist = state.get("need_ip") # type: typing.List[Span]
spanlist: typing.List[Span] = state.get("need_ip")
if not spanlist:
return True
@ -88,7 +88,7 @@ def trysetip(conn: http.client.HTTPConnection, loglevel=logging.DEBUG) -> bool:
sock = "<property not accessed>"
try:
sock = conn.sock # type: typing.Optional[socket.socket]
sock: typing.Optional[socket.socket] = conn.sock
logger.debug("Got socket: %s", sock)
if sock is None:
return False
@ -163,7 +163,7 @@ def set_ip_on_next_http_connection(span: Span):
finally:
context.detach(token)
else:
spans = state["need_ip"] # type: typing.List[Span]
spans: typing.List[Span] = state["need_ip"]
spans.append(span)
try:
yield