getsentry / sentry-python

The official Python SDK for Sentry.io
https://sentry.io/for/python/
MIT License
1.93k stars 509 forks source link

Fix flake8 #3783

Closed sentrivana closed 6 days ago

sentrivana commented 1 week ago

Tiny PR with some flake8 fixes:

Original output:

linters: commands[0]> flake8 tests sentry_sdk
tests/test_utils.py:109:12: F821 undefined name 'datetime_from_isoformat'
tests/test_api.py:4:1: F401 'sentry_sdk' imported but unused
sentry_sdk/_init_implementation.py:1:1: F401 'warnings' imported but unused
sentry_sdk/integrations/aiohttp.py:393:33: E231 missing whitespace after ':'
codecov[bot] commented 1 week ago

:x: 1600 Tests Failed:

Tests completed Failed Passed Skipped
19820 1600 18220 4413
View the top 1 failed tests by shortest run time > > ```python > tests.test_scope test_with_isolation_scope > ``` > >
Stack Traces | 0.001s run time > > > > > ```python > > tests/test_scope.py:357: in test_with_isolation_scope > > assert scope is in_with_isolation_scope > > E assert is > > ``` > >

View the full list of 2 :snowflake: flaky tests > > ```python > tests.test_scope test_with_isolation_scope_data > ``` > > **Flake rate in main:** 99.16% (Passed 2 times, Failed 235 times) >
Stack Traces | 0.001s run time > > > > > ```python > > tests/test_scope.py:387: in test_with_isolation_scope_data > > assert scope._tags == {"before_isolation_scope": 1} > > E AssertionError: assert {} == {'before_isolation_scope': 1} > > E > > E Right contains 1 more item: > > E {'before_isolation_scope': 1} > > E > > E Full diff: > > E + {} > > E - { > > E - 'before_isolation_scope': 1, > > E - } > > ``` > >
tests.test_scope test_with_new_scope

Flake rate in main: 96.98% (Passed 8 times, Failed 257 times)

Stack Traces | 0.001s run time > > ```python > tests/test_scope.py:587: in test_with_new_scope > assert scope is in_with_current_scope > E assert is > ```

To view more test analytics, go to the Test Analytics Dashboard Got feedback? Let us know on Github