Browse Source

fix: ensure typing

pull/15911/head
marcelomarkus 3 weeks ago
parent
commit
b338540875
  1. 2
      docs_src/kubernetes/tutorial002.py

2
docs_src/kubernetes/tutorial002.py

@ -7,7 +7,7 @@ from fastapi import FastAPI
# Custom filter to remove healthcheck endpoints from logs
class EndpointFilter(logging.Filter):
def filter(self, record: logging.LogRecord) -> bool:
if record.args and len(record.args) >= 3:
if isinstance(record.args, tuple) and len(record.args) >= 3:
path = record.args[2]
if path in ("/healthz", "/readyz", "/livez"):
return False

Loading…
Cancel
Save