Skip to content

Commit

Permalink
fix: Fix circular import in apidocs
Browse files Browse the repository at this point in the history
  • Loading branch information
untitaker committed Aug 13, 2019
1 parent a1b1faa commit 71b9e1f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
15 changes: 5 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,19 @@ lint: .venv

.PHONY: lint

apidocs-sphinx: .venv
@$(VENV_PATH)/bin/pip install --editable .
@$(VENV_PATH)/bin/pip install -U -r ./docs-requirements.txt
@$(VENV_PATH)/bin/sphinx-build -b html docs/ docs/_build
.PHONY: apidocs-sphinx

apidocs: .venv
@$(VENV_PATH)/bin/pip install --editable .
@$(VENV_PATH)/bin/pip install pdoc==0.3.2 pygments
@$(VENV_PATH)/bin/pdoc --overwrite --html --html-dir build/apidocs sentry_sdk
@$(VENV_PATH)/bin/pip install -U -r ./docs-requirements.txt
@$(VENV_PATH)/bin/sphinx-build -W -b html docs/ docs/_build
.PHONY: apidocs

install-zeus-cli:
npm install -g @zeus-ci/cli
.PHONY: install-zeus-cli

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

Expand Down
4 changes: 2 additions & 2 deletions sentry_sdk/tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from typing import Dict
from typing import List

from sentry_sdk import Hub
import sentry_sdk

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

@contextlib.contextmanager
def record_sql_queries(
hub, # type: Hub
hub, # type: sentry_sdk.Hub
cursor, # type: Any
query, # type: Any
params_list, # type: Any
Expand Down
2 changes: 1 addition & 1 deletion tests/integrations/flask/test_flask.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,4 +576,4 @@ def dispatch_request(self):
event, = events

assert event["message"] == "hi"
assert event['transaction'] == 'hello_class'
assert event["transaction"] == "hello_class"

0 comments on commit 71b9e1f

Please sign in to comment.