Skip to content

Commit 7f4bce8

Browse files
committed
chore: Run black formatter ✨
1 parent 7481bd3 commit 7f4bce8

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/paste/schema.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
from typing import Optional
22
from pydantic import BaseModel
33

4+
45
class Data(BaseModel):
56
input_data: str
67

8+
79
class PasteCreate(BaseModel):
810
content: str
911
extension: Optional[str] = None
1012

13+
1114
class PasteResponse(BaseModel):
1215
uuid: str
1316
url: str
1417

18+
1519
class PasteDetails(BaseModel):
1620
uuid: str
1721
content: str

src/paste/utils.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ def extract_extension(file_name: Path) -> str:
2323

2424
def _find_without_extension(file_name: str) -> str:
2525
file_list: list = os.listdir("data")
26-
pattern_with_dot: Pattern[str] = re.compile(
27-
r"^(" + re.escape(file_name) + r")\.")
28-
pattern_without_dot: Pattern[str] = re.compile(
29-
r"^" + file_name + "$")
26+
pattern_with_dot: Pattern[str] = re.compile(r"^(" + re.escape(file_name) + r")\.")
27+
pattern_without_dot: Pattern[str] = re.compile(r"^" + file_name + "$")
3028
math_pattern: list = [
31-
x for x in file_list if pattern_with_dot.match(x) or pattern_without_dot.match(x)]
29+
x
30+
for x in file_list
31+
if pattern_with_dot.match(x) or pattern_without_dot.match(x)
32+
]
3233
if len(math_pattern) == 0:
3334
return str()
3435
else:

0 commit comments

Comments
 (0)