Skip to content

Commit 808e361

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 37f4920 commit 808e361

File tree

6 files changed

+10
-24
lines changed

6 files changed

+10
-24
lines changed

examples/flask/app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818

1919
db = SQLAlchemy(engine_options={"echo": True})
2020
app = Flask(__name__)
21-
app.config[
22-
"SQLALCHEMY_DATABASE_URI"
23-
] = "sqlite:////tmp/example.db?check_same_thread=False"
21+
app.config["SQLALCHEMY_DATABASE_URI"] = (
22+
"sqlite:////tmp/example.db?check_same_thread=False"
23+
)
2424
db.init_app(app)
2525

2626

sqlalchemy_file/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__version__ = "0.6.0"
22

3-
from .file import File as File # noqa
4-
from .types import FileField as FileField # noqa
5-
from .types import ImageField as ImageField # noqa
3+
from .file import File as File
4+
from .types import FileField as FileField
5+
from .types import ImageField as ImageField

sqlalchemy_file/storage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def save_file(
9393
if (
9494
container.driver.name == LOCAL_STORAGE_DRIVER_NAME
9595
and extra is not None
96-
and extra.get("meta_data", None) is not None
96+
and extra.get("meta_data") is not None
9797
):
9898
"""
9999
Libcloud local storage driver doesn't support metadata, so the metadata

tests/test_multiple_field.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,7 @@ class Attachment(Base):
3636
multiple_content = Column(FileField(multiple=True))
3737

3838
def __repr__(self):
39-
return "<Attachment: id {} ; name: {}; multiple_content {}>".format(
40-
self.id,
41-
self.name,
42-
self.multiple_content,
43-
) # pragma: no cover
39+
return f"<Attachment: id {self.id} ; name: {self.name}; multiple_content {self.multiple_content}>" # pragma: no cover
4440

4541

4642
class TestMultipleField:

tests/test_result_value.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,7 @@ class Attachment(Base):
3333
)
3434

3535
def __repr__(self):
36-
return "<Attachment: id {} ; name: {}; content {}; multiple_content {}>".format(
37-
self.id,
38-
self.name,
39-
self.content,
40-
self.multiple_content,
41-
) # pragma: no cover
36+
return f"<Attachment: id {self.id} ; name: {self.name}; content {self.content}; multiple_content {self.multiple_content}>" # pragma: no cover
4237

4338

4439
class TestResultValue:

tests/test_single_field.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,7 @@ class Attachment(Base):
3737
article_id = Column(Integer, ForeignKey("article.id"))
3838

3939
def __repr__(self):
40-
return "<Attachment: id {} ; name: {}; content {}; article_id {}>".format(
41-
self.id,
42-
self.name,
43-
self.content,
44-
self.article_id,
45-
) # pragma: no cover
40+
return f"<Attachment: id {self.id} ; name: {self.name}; content {self.content}; article_id {self.article_id}>" # pragma: no cover
4641

4742

4843
class Article(Base):

0 commit comments

Comments
 (0)