Skip to content

Commit

Permalink
Fixed circular import
Browse files Browse the repository at this point in the history
  • Loading branch information
antonpirker committed Jun 22, 2023
1 parent 9a4fb55 commit 9327e4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ lint: .venv
apidocs: .venv
@$(VENV_PATH)/bin/pip install --editable .
@$(VENV_PATH)/bin/pip install -U -r ./docs-requirements.txt
@$(VENV_PATH)/bin/sphinx-build -W -b html docs/ docs/_build
@$(VENV_PATH)/bin/sphinx-build -vv -W -b html docs/ docs/_build
.PHONY: apidocs

apidocs-hotfix: apidocs
Expand Down
5 changes: 3 additions & 2 deletions sentry_sdk/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

from sentry_sdk._types import TYPE_CHECKING

from sentry_sdk.consts import FALSE_VALUES

if TYPE_CHECKING:
from typing import Optional
from typing import Tuple
Expand Down Expand Up @@ -84,6 +82,9 @@ def check_thread_support():
if "threads" in opt:
return

# put here because of circular import
from sentry_sdk.consts import FALSE_VALUES

Check warning on line 86 in sentry_sdk/_compat.py

View check run for this annotation

Codecov / codecov/patch

sentry_sdk/_compat.py#L86

Added line #L86 was not covered by tests

if str(opt.get("enable-threads", "0")).lower() in FALSE_VALUES:
from warnings import warn

Expand Down

0 comments on commit 9327e4e

Please sign in to comment.