Skip to content

Commit cc8939b

Browse files
committed
lint code
1 parent 279ae20 commit cc8939b

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
lint:
2+
black .
3+
isort .
4+
15
test:
26
poetry run -m pytest
37

datauri/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ def __get_validators__(cls):
137137
@classmethod
138138
def validate(cls, v):
139139
if not isinstance(v, str):
140-
raise TypeError('string required')
140+
raise TypeError("string required")
141141

142142
m = cls(v)
143143
if not m.is_valid:
144-
raise ValueError('invalid data-uri format')
144+
raise ValueError("invalid data-uri format")
145145
return m
146146

147147
@classmethod
@@ -150,5 +150,7 @@ def __modify_schema__(cls, field_schema):
150150
# the returned value will be ignored
151151
field_schema.update(
152152
pattern=DATA_URI_REGEX,
153-
examples=["data:text/plain;charset=utf-8;base64,VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wZWQgb3ZlciB0aGUgbGF6eSBkb2cu"],
153+
examples=[
154+
"data:text/plain;charset=utf-8;base64,VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wZWQgb3ZlciB0aGUgbGF6eSBkb2cu"
155+
],
154156
)

tests/test_pydantic.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import pytest
22

33
from datauri import DataURI
4+
45
pydantic = pytest.importorskip("pydantic")
56

67

0 commit comments

Comments
 (0)