Skip to content

Commit 257302c

Browse files
committed
format
1 parent 9f6b4e0 commit 257302c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

soccerdata/understat.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,9 @@ def _request_api(
707707
self, url: str, filepath: Optional[Path] = None, no_cache: bool = False
708708
) -> IO[bytes]:
709709
"""Make an API request with proper headers and caching."""
710-
is_cached = filepath is not None and filepath.exists() and not no_cache and not self.no_cache
710+
is_cached = (
711+
filepath is not None and filepath.exists() and not no_cache and not self.no_cache
712+
)
711713
if is_cached and filepath is not None:
712714
return filepath.open(mode="rb")
713715

@@ -725,7 +727,7 @@ def _request_api(
725727
@staticmethod
726728
def _extract_team_name(html: str) -> str:
727729
"""Extract team name from tmpl HTML."""
728-
match = re.search(r'<h3><a[^>]*>([^<]+)</a></h3>', html)
730+
match = re.search(r"<h3><a[^>]*>([^<]+)</a></h3>", html)
729731
if match:
730732
return match.group(1)
731733
return ""
@@ -756,4 +758,4 @@ def _as_str(value: Any) -> Optional[str]:
756758
try:
757759
return unescape(value)
758760
except (TypeError, ValueError):
759-
return None
761+
return None

0 commit comments

Comments
 (0)