From b109aca2fa8fb697bca4c9392d7bad1b364d50b9 Mon Sep 17 00:00:00 2001 From: Frank Hamand Date: Wed, 17 Apr 2024 10:15:28 +0100 Subject: [PATCH] fix linting errors --- posthog/asgi.py | 2 +- posthog/settings/sentry.py | 2 +- posthog/wsgi.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/posthog/asgi.py b/posthog/asgi.py index 014c33d3647a6..22912a0c7b76e 100644 --- a/posthog/asgi.py +++ b/posthog/asgi.py @@ -3,6 +3,6 @@ from django.core.asgi import get_asgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "posthog.settings") -os.environ.setdefault('SERVER_GATEWAY_INTERFACE', 'ASGI') +os.environ.setdefault("SERVER_GATEWAY_INTERFACE", "ASGI") application = get_asgi_application() diff --git a/posthog/settings/sentry.py b/posthog/settings/sentry.py index 5b792299ddb17..d61d99077ed52 100644 --- a/posthog/settings/sentry.py +++ b/posthog/settings/sentry.py @@ -78,7 +78,7 @@ def traces_sampler(sampling_context: dict) -> float: path = sampling_context.get("asgi_scope", {}).get("path") headers = sampling_context.get("asgi_scope", {}).get("headers", []) for name, value in headers: - if name.lower().replace(b'_',b'-') == "force-sample": + if name.lower().replace(b"_", b"-") == "force-sample": force_sample = bool(value) # HTTP header to force sampling set diff --git a/posthog/wsgi.py b/posthog/wsgi.py index 41e70199199cb..b118b29fbf4bf 100644 --- a/posthog/wsgi.py +++ b/posthog/wsgi.py @@ -12,6 +12,6 @@ from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "posthog.settings") -os.environ.setdefault('SERVER_GATEWAY_INTERFACE', 'WSGI') +os.environ.setdefault("SERVER_GATEWAY_INTERFACE", "WSGI") application = get_wsgi_application()