Skip to content

Commit 71b9e1f

Browse files
committed
fix: Fix circular import in apidocs
1 parent a1b1faa commit 71b9e1f

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

Makefile

+5-10
Original file line numberDiff line numberDiff line change
@@ -48,24 +48,19 @@ lint: .venv
4848

4949
.PHONY: lint
5050

51-
apidocs-sphinx: .venv
52-
@$(VENV_PATH)/bin/pip install --editable .
53-
@$(VENV_PATH)/bin/pip install -U -r ./docs-requirements.txt
54-
@$(VENV_PATH)/bin/sphinx-build -b html docs/ docs/_build
55-
.PHONY: apidocs-sphinx
56-
5751
apidocs: .venv
5852
@$(VENV_PATH)/bin/pip install --editable .
59-
@$(VENV_PATH)/bin/pip install pdoc==0.3.2 pygments
60-
@$(VENV_PATH)/bin/pdoc --overwrite --html --html-dir build/apidocs sentry_sdk
53+
@$(VENV_PATH)/bin/pip install -U -r ./docs-requirements.txt
54+
@$(VENV_PATH)/bin/sphinx-build -W -b html docs/ docs/_build
6155
.PHONY: apidocs
56+
6257
install-zeus-cli:
6358
npm install -g @zeus-ci/cli
6459
.PHONY: install-zeus-cli
6560

6661
travis-upload-docs: apidocs install-zeus-cli
67-
cd build/apidocs && zip -r gh-pages ./sentry_sdk
68-
zeus upload -t "application/zip+docs" build/apidocs/gh-pages.zip \
62+
cd docs/_build && zip -r gh-pages ./sentry_sdk
63+
zeus upload -t "application/zip+docs" docs/_build/gh-pages.zip \
6964
|| [[ ! "$(TRAVIS_BRANCH)" =~ ^release/ ]]
7065
.PHONY: travis-upload-docs
7166

sentry_sdk/tracing.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from typing import Dict
2323
from typing import List
2424

25-
from sentry_sdk import Hub
25+
import sentry_sdk
2626

2727
_traceparent_header_format_re = re.compile(
2828
"^[ \t]*" # whitespace
@@ -249,7 +249,7 @@ def _format_sql(cursor, sql):
249249

250250
@contextlib.contextmanager
251251
def record_sql_queries(
252-
hub, # type: Hub
252+
hub, # type: sentry_sdk.Hub
253253
cursor, # type: Any
254254
query, # type: Any
255255
params_list, # type: Any

tests/integrations/flask/test_flask.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -576,4 +576,4 @@ def dispatch_request(self):
576576
event, = events
577577

578578
assert event["message"] == "hi"
579-
assert event['transaction'] == 'hello_class'
579+
assert event["transaction"] == "hello_class"

0 commit comments

Comments
 (0)