Skip to content

Commit

Permalink
[Minor] Suppress Errant MyPy Error
Browse files Browse the repository at this point in the history
  • Loading branch information
Rixxan committed Nov 17, 2023
1 parent 6c06600 commit a169fb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/eddn.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,13 +428,13 @@ def send_message(self, msg: str) -> bool:
r.raise_for_status()

except requests.exceptions.HTTPError as e:
if unknown_schema := self.UNKNOWN_SCHEMA_RE.match(e.response.text):
if unknown_schema := self.UNKNOWN_SCHEMA_RE.match(e.response.text): # type: ignore
logger.debug(f"EDDN doesn't (yet?) know about schema: {unknown_schema['schema_name']}"
f"/{unknown_schema['schema_version']}")
# This dropping is to cater for the time period when EDDN doesn't *yet* support a new schema.
return True

if e.response.status_code == http.HTTPStatus.BAD_REQUEST:
if e.response.status_code == http.HTTPStatus.BAD_REQUEST: # type: ignore
# EDDN straight up says no, so drop the message
logger.debug(f"EDDN responded '400 Bad Request' to the message, dropping:\n{msg!r}")
return True
Expand Down

0 comments on commit a169fb5

Please sign in to comment.