mirror of https://github.com/zulip/zulip.git
mypy: Fix strict_equality violations.
puppet/zulip/files/nagios_plugins/zulip_postgresql/check_postgresql_replication_lag:98: error: Non-overlapping equality check (left operand type: "List[List[str]]", right operand type: "Literal[0]") [comparison-overlap] zerver/tests/test_realm.py:650: error: Non-overlapping container check (element type: "Dict[str, Any]", container item type: "str") [comparison-overlap] Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
2e928a0853
commit
b01d43f339
|
@ -95,7 +95,7 @@ else:
|
|||
replication_info = run_sql_query(
|
||||
"client_addr, state, sent_lsn, write_lsn, flush_lsn, replay_lsn from pg_stat_replication"
|
||||
)
|
||||
if replication_info == 0:
|
||||
if not replication_info:
|
||||
report("CRITICAL", "No replicas!")
|
||||
elif len(replication_info) == 1:
|
||||
report("WARNING", "Only one replica!")
|
||||
|
|
|
@ -849,7 +849,7 @@ Output:
|
|||
self.assertNotEqual(json["msg"], "Error parsing JSON in response!")
|
||||
return json
|
||||
|
||||
def get_json_error(self, result: HttpResponse, status_code: int = 400) -> Dict[str, Any]:
|
||||
def get_json_error(self, result: HttpResponse, status_code: int = 400) -> str:
|
||||
try:
|
||||
json = orjson.loads(result.content)
|
||||
except orjson.JSONDecodeError: # nocoverage
|
||||
|
|
Loading…
Reference in New Issue