mirror of
https://github.com/fastapi-practices/fastapi_best_architecture.git
synced 2025-08-14 02:32:38 +08:00
update the ruff settings
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@ venv/
|
||||
backend/app/log/
|
||||
backend/app/alembic/versions/
|
||||
backend/app/static/media/
|
||||
.ruff_cache/
|
||||
|
22
.ruff.toml
22
.ruff.toml
@ -1,2 +1,24 @@
|
||||
ignore = ["F401"]
|
||||
line-length = 120
|
||||
format = "grouped"
|
||||
target-version = "py38"
|
||||
cache-dir = "./.ruff_cache"
|
||||
|
||||
[flake8-pytest-style]
|
||||
mark-parentheses = false
|
||||
parametrize-names-type = "list"
|
||||
parametrize-values-row-type = "list"
|
||||
parametrize-values-type = "tuple"
|
||||
|
||||
[flake8-quotes]
|
||||
avoid-escape = false
|
||||
docstring-quotes = "double"
|
||||
inline-quotes = "single"
|
||||
multiline-quotes = "double"
|
||||
|
||||
[flake8-unused-arguments]
|
||||
ignore-variadic-names = true
|
||||
|
||||
[isort]
|
||||
lines-between-types = 1
|
||||
order-by-type = true
|
||||
|
@ -48,7 +48,7 @@ class DataClassBase(MappedAsDataclass, MappedBase):
|
||||
声明性数据类基类, 它将带有数据类集成, 允许使用更高级配置, 但你必须注意它的一些特性, 尤其是和 DeclarativeBase 一起使用时
|
||||
|
||||
`MappedAsDataclass <https://docs.sqlalchemy.org/en/20/orm/dataclasses.html#orm-declarative-native-dataclasses>`__
|
||||
"""
|
||||
""" # noqa: E501
|
||||
|
||||
__abstract__ = True
|
||||
|
||||
@ -56,7 +56,7 @@ class DataClassBase(MappedAsDataclass, MappedBase):
|
||||
class Base(DataClassBase, _BaseMixin):
|
||||
"""
|
||||
声明性 Mixin 数据类基类, 带有数据类集成, 并包含 MiXin 数据类基础表结构, 你可以简单的理解它为含有基础表结构的数据类基类
|
||||
"""
|
||||
""" # noqa: E501
|
||||
|
||||
__abstract__ = True
|
||||
|
||||
|
Reference in New Issue
Block a user