Skip to content

Commit

Permalink
Replaced all-encompassing ignore of PIE786 with specific noqa comments
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Sep 12, 2020
1 parent a4e37a6 commit 8e19ae3
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion httpcore/_async/connection.py
Expand Up @@ -112,7 +112,7 @@ async def _open_socket(self, timeout: TimeoutDict = None) -> AsyncSocketStream:
return await self.backend.open_uds_stream(
self.uds, hostname, ssl_context, timeout
)
except Exception:
except Exception: # noqa: PIE786
self.connect_failed = True
raise

Expand Down
2 changes: 1 addition & 1 deletion httpcore/_async/connection_pool.py
Expand Up @@ -192,7 +192,7 @@ async def request(
)
except NewConnectionRequired:
connection = None
except Exception:
except Exception: # noqa: PIE786
logger.trace("remove from pool connection=%r", connection)
await self._remove_from_pool(connection)
raise
Expand Down
2 changes: 1 addition & 1 deletion httpcore/_async/http2.py
Expand Up @@ -124,7 +124,7 @@ async def request(
self.streams[stream_id] = h2_stream
self.events[stream_id] = []
return await h2_stream.request(method, url, headers, stream, timeout)
except Exception:
except Exception: # noqa: PIE786
await self.max_streams_semaphore.release()
raise

Expand Down
2 changes: 1 addition & 1 deletion httpcore/_exceptions.py
Expand Up @@ -6,7 +6,7 @@
def map_exceptions(map: Dict[Type[Exception], Type[Exception]]) -> Iterator[None]:
try:
yield
except Exception as exc:
except Exception as exc: # noqa: PIE786
for from_exc, to_exc in map.items():
if isinstance(exc, from_exc):
raise to_exc(exc) from None
Expand Down
2 changes: 1 addition & 1 deletion httpcore/_sync/connection.py
Expand Up @@ -112,7 +112,7 @@ def _open_socket(self, timeout: TimeoutDict = None) -> SyncSocketStream:
return self.backend.open_uds_stream(
self.uds, hostname, ssl_context, timeout
)
except Exception:
except Exception: # noqa: PIE786
self.connect_failed = True
raise

Expand Down
2 changes: 1 addition & 1 deletion httpcore/_sync/connection_pool.py
Expand Up @@ -192,7 +192,7 @@ def request(
)
except NewConnectionRequired:
connection = None
except Exception:
except Exception: # noqa: PIE786
logger.trace("remove from pool connection=%r", connection)
self._remove_from_pool(connection)
raise
Expand Down
2 changes: 1 addition & 1 deletion httpcore/_sync/http2.py
Expand Up @@ -124,7 +124,7 @@ def request(
self.streams[stream_id] = h2_stream
self.events[stream_id] = []
return h2_stream.request(method, url, headers, stream, timeout)
except Exception:
except Exception: # noqa: PIE786
self.max_streams_semaphore.release()
raise

Expand Down

0 comments on commit 8e19ae3

Please sign in to comment.