Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 18, 2024
1 parent 8627d7d commit 32d85e8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions easyverein/modules/invoice.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import logging
from pathlib import Path
import re
from typing import List
import urllib
from pathlib import Path
from typing import List

from requests.structures import CaseInsensitiveDict

Expand Down Expand Up @@ -172,9 +172,9 @@ def get_attachment(
)

# Fix for unencoded characters - should probably be fixed in easyverein API
m = re.fullmatch(r'^(.*\&path=)(.*)(&storedInS3=True)$', path.unicode_string())
m = re.fullmatch(r"^(.*\&path=)(.*)(&storedInS3=True)$", path.unicode_string())
url_components = list(m.groups())
if '%' not in url_components[1]:
if "%" not in url_components[1]:
url_components[1] = urllib.parse.quote(url_components[1])

return self.c.fetch_file(''.join(url_components))
return self.c.fetch_file("".join(url_components))

0 comments on commit 32d85e8

Please sign in to comment.