Skip to content

Commit 8db3e31

Browse files
committed
undo line changes
1 parent 61eba6c commit 8db3e31

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

posthog/exception_integrations/django.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class DjangoIntegration:
2727
identifier = "django"
2828

2929
def __init__(self, capture_exception_fn=None):
30+
3031
if DJANGO_VERSION < (4, 2):
3132
raise IntegrationEnablingError("Django 4.2 or newer is required.")
3233

@@ -54,6 +55,7 @@ def uninstall(self):
5455

5556

5657
class DjangoRequestExtractor:
58+
5759
def __init__(self, request):
5860
# type: (Any) -> None
5961
self.request = request

posthog/exception_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222

2323
if TYPE_CHECKING:
24+
2425
from types import FrameType, TracebackType
2526
from typing import ( # noqa: F401
2627
Any,

posthog/test/test_client.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ def test_basic_super_properties(self):
100100
self.assertEqual(msg["properties"]["source"], "repo-name")
101101

102102
def test_basic_capture_exception(self):
103+
103104
with mock.patch.object(Client, "capture", return_value=None) as patch_capture:
104105
client = self.client
105106
exception = Exception("test exception")
@@ -127,6 +128,7 @@ def test_basic_capture_exception(self):
127128
)
128129

129130
def test_basic_capture_exception_with_distinct_id(self):
131+
130132
with mock.patch.object(Client, "capture", return_value=None) as patch_capture:
131133
client = self.client
132134
exception = Exception("test exception")
@@ -154,6 +156,7 @@ def test_basic_capture_exception_with_distinct_id(self):
154156
)
155157

156158
def test_basic_capture_exception_with_correct_host_generation(self):
159+
157160
with mock.patch.object(Client, "capture", return_value=None) as patch_capture:
158161
client = Client(FAKE_TEST_API_KEY, on_error=self.set_fail, host="https://aloha.com")
159162
exception = Exception("test exception")
@@ -181,6 +184,7 @@ def test_basic_capture_exception_with_correct_host_generation(self):
181184
)
182185

183186
def test_basic_capture_exception_with_correct_host_generation_for_server_hosts(self):
187+
184188
with mock.patch.object(Client, "capture", return_value=None) as patch_capture:
185189
client = Client(FAKE_TEST_API_KEY, on_error=self.set_fail, host="https://app.posthog.com")
186190
exception = Exception("test exception")
@@ -208,6 +212,7 @@ def test_basic_capture_exception_with_correct_host_generation_for_server_hosts(s
208212
)
209213

210214
def test_basic_capture_exception_with_no_exception_given(self):
215+
211216
with mock.patch.object(Client, "capture", return_value=None) as patch_capture:
212217
client = self.client
213218
try:
@@ -244,8 +249,10 @@ def test_basic_capture_exception_with_no_exception_given(self):
244249
self.assertEqual(capture_call[2]["$exception_list"][0]["stacktrace"]["frames"][0]["in_app"], True)
245250

246251
def test_basic_capture_exception_with_no_exception_happening(self):
252+
247253
with mock.patch.object(Client, "capture", return_value=None) as patch_capture:
248254
with self.assertLogs("posthog", level="WARNING") as logs:
255+
249256
client = self.client
250257
client.capture_exception()
251258

0 commit comments

Comments
 (0)