Skip to content

Commit b87a0a5

Browse files
build(deps): bump mypy from 0.740 to 0.761 (#629)
1 parent 31108dc commit b87a0a5

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

linter-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
black==19.03b0
22
flake8
33
flake8-import-order
4-
mypy==0.740
4+
mypy==0.761
55
flake8-bugbear>=19.8.0

sentry_sdk/consts.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ def _get_default_options():
6565
getargspec = inspect.getargspec # type: ignore
6666

6767
a = getargspec(ClientConstructor.__init__)
68-
return dict(zip(a.args[-len(a.defaults) :], a.defaults))
68+
defaults = a.defaults or ()
69+
return dict(zip(a.args[-len(defaults) :], defaults))
6970

7071

7172
DEFAULT_OPTIONS = _get_default_options()

sentry_sdk/integrations/django/transactions.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from django.urls.resolvers import URLPattern
1818
from typing import Tuple
1919
from typing import Union
20-
from re import Pattern # type: ignore
20+
from re import Pattern
2121

2222
try:
2323
from django.urls import get_resolver
@@ -26,7 +26,7 @@
2626

2727

2828
def get_regex(resolver_or_pattern):
29-
# type: (Union[URLPattern, URLResolver]) -> Pattern
29+
# type: (Union[URLPattern, URLResolver]) -> Pattern[str]
3030
"""Utility method for django's deprecated resolver.regex"""
3131
try:
3232
regex = resolver_or_pattern.regex
@@ -99,9 +99,9 @@ def _resolve(self, resolver, path, parents=None):
9999
for pattern in resolver.url_patterns:
100100
# this is an include()
101101
if not pattern.callback:
102-
match = self._resolve(pattern, new_path, parents)
103-
if match:
104-
return match
102+
match_ = self._resolve(pattern, new_path, parents)
103+
if match_:
104+
return match_
105105
continue
106106
elif not get_regex(pattern).search(new_path):
107107
continue

0 commit comments

Comments
 (0)