Skip to content

Commit c5b0098

Browse files
dependabot-preview[bot]untitakersentry-bot
authored
build(deps): bump black from 19.10b0 to 20.8b1 (#801)
* build(deps): bump black from 19.10b0 to 20.8b1 Bumps [black](https://github.com/psf/black) from 19.10b0 to 20.8b1. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/master/CHANGES.md) - [Commits](https://github.com/psf/black/commits) Signed-off-by: dependabot-preview[bot] <[email protected]> * add black action * always run black action, its a python-only project * attempt push * fix: Formatting Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Markus Unterwaditzer <[email protected]> Co-authored-by: sentry-bot <[email protected]>
1 parent 7afdded commit c5b0098

File tree

15 files changed

+109
-56
lines changed

15 files changed

+109
-56
lines changed

.github/workflows/black.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: black
2+
3+
on: push
4+
5+
jobs:
6+
format:
7+
runs-on: ubuntu-16.04
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-python@v2
11+
with:
12+
python-version: '3.x'
13+
14+
- name: Install Black
15+
run: pip install -r linter-requirements.txt
16+
17+
- name: Run Black
18+
run: black tests examples sentry_sdk
19+
20+
- name: Commit changes
21+
run: |
22+
git config --global user.name 'sentry-bot'
23+
git config --global user.email '[email protected]'
24+
git commit -am "fix: Formatting"
25+
git push

linter-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
black==19.10b0
1+
black==20.8b1
22
flake8==3.8.3
33
flake8-import-order==0.18.1
44
mypy==0.782

sentry_sdk/_functools.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ def update_wrapper(
2828
# type: (Any, Any, Any, Any) -> Any
2929
"""Update a wrapper function to look like the wrapped function
3030
31-
wrapper is the function to be updated
32-
wrapped is the original function
33-
assigned is a tuple naming the attributes assigned directly
34-
from the wrapped function to the wrapper function (defaults to
35-
functools.WRAPPER_ASSIGNMENTS)
36-
updated is a tuple naming the attributes of the wrapper that
37-
are updated with the corresponding attribute from the wrapped
38-
function (defaults to functools.WRAPPER_UPDATES)
31+
wrapper is the function to be updated
32+
wrapped is the original function
33+
assigned is a tuple naming the attributes assigned directly
34+
from the wrapped function to the wrapper function (defaults to
35+
functools.WRAPPER_ASSIGNMENTS)
36+
updated is a tuple naming the attributes of the wrapper that
37+
are updated with the corresponding attribute from the wrapped
38+
function (defaults to functools.WRAPPER_UPDATES)
3939
"""
4040
for attr in assigned:
4141
try:
@@ -57,10 +57,10 @@ def wraps(wrapped, assigned=WRAPPER_ASSIGNMENTS, updated=WRAPPER_UPDATES):
5757
# type: (Callable[..., Any], Any, Any) -> Callable[[Callable[..., Any]], Callable[..., Any]]
5858
"""Decorator factory to apply update_wrapper() to a wrapper function
5959
60-
Returns a decorator that invokes update_wrapper() with the decorated
61-
function as the wrapper argument and the arguments to wraps() as the
62-
remaining arguments. Default arguments are as for update_wrapper().
63-
This is a convenience function to simplify applying partial() to
64-
update_wrapper().
60+
Returns a decorator that invokes update_wrapper() with the decorated
61+
function as the wrapper argument and the arguments to wraps() as the
62+
remaining arguments. Default arguments are as for update_wrapper().
63+
This is a convenience function to simplify applying partial() to
64+
update_wrapper().
6565
"""
6666
return partial(update_wrapper, wrapped=wrapped, assigned=assigned, updated=updated)

sentry_sdk/hub.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,7 @@ def capture_event(
315315
**scope_args # type: Dict[str, Any]
316316
):
317317
# type: (...) -> Optional[str]
318-
"""Captures an event. Alias of :py:meth:`sentry_sdk.Client.capture_event`.
319-
"""
318+
"""Captures an event. Alias of :py:meth:`sentry_sdk.Client.capture_event`."""
320319
client, top_scope = self._stack[-1]
321320
scope = _update_scope(top_scope, scope, scope_args)
322321
if client is not None:

sentry_sdk/integrations/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ def _generate_default_integrations_iterator(integrations, auto_enabling_integrat
2727

2828
def iter_default_integrations(with_auto_enabling_integrations):
2929
# type: (bool) -> Iterator[Type[Integration]]
30-
"""Returns an iterator of the default integration classes:
31-
"""
30+
"""Returns an iterator of the default integration classes:"""
3231
from importlib import import_module
3332

3433
if with_auto_enabling_integrations:

sentry_sdk/integrations/asgi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ async def _run_app(self, scope, callback):
124124

125125
if ty in ("http", "websocket"):
126126
transaction = Transaction.continue_from_headers(
127-
dict(scope["headers"]), op="{}.server".format(ty),
127+
dict(scope["headers"]),
128+
op="{}.server".format(ty),
128129
)
129130
else:
130131
transaction = Transaction(op="asgi.server")

sentry_sdk/integrations/aws_lambda.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,15 @@ def inner(*args, **kwargs):
227227

228228
return inner # type: ignore
229229

230-
lambda_bootstrap.LambdaRuntimeClient.post_invocation_result = _wrap_post_function(
231-
lambda_bootstrap.LambdaRuntimeClient.post_invocation_result
230+
lambda_bootstrap.LambdaRuntimeClient.post_invocation_result = (
231+
_wrap_post_function(
232+
lambda_bootstrap.LambdaRuntimeClient.post_invocation_result
233+
)
232234
)
233-
lambda_bootstrap.LambdaRuntimeClient.post_invocation_error = _wrap_post_function(
234-
lambda_bootstrap.LambdaRuntimeClient.post_invocation_error
235+
lambda_bootstrap.LambdaRuntimeClient.post_invocation_error = (
236+
_wrap_post_function(
237+
lambda_bootstrap.LambdaRuntimeClient.post_invocation_error
238+
)
235239
)
236240

237241

sentry_sdk/integrations/excepthook.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
from types import TracebackType
1515

1616
Excepthook = Callable[
17-
[Type[BaseException], BaseException, TracebackType], Any,
17+
[Type[BaseException], BaseException, TracebackType],
18+
Any,
1819
]
1920

2021

sentry_sdk/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ class ServerlessTimeoutWarning(Exception):
883883

884884
class TimeoutThread(threading.Thread):
885885
"""Creates a Thread which runs (sleeps) for a time duration equal to
886-
waiting_time and raises a custom ServerlessTimeout exception.
886+
waiting_time and raises a custom ServerlessTimeout exception.
887887
"""
888888

889889
def __init__(self, waiting_time, configured_timeout):

tests/integrations/flask/test_flask.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,9 @@ def test_flask_session_tracking(sentry_init, capture_envelopes, app):
247247
sentry_init(
248248
integrations=[flask_sentry.FlaskIntegration()],
249249
release="demo-release",
250-
_experiments=dict(auto_session_tracking=True,),
250+
_experiments=dict(
251+
auto_session_tracking=True,
252+
),
251253
)
252254

253255
@app.route("/")

0 commit comments

Comments
 (0)