ignore no of arguments warning in model_fields flake qa

This commit is contained in:
collerek
2020-08-28 16:12:17 +02:00
parent bd1d47a923
commit dd4fc2c8ec
2 changed files with 5 additions and 5 deletions

View File

@ -57,7 +57,7 @@ class String(ModelFieldFactory):
_bases = (pydantic.ConstrainedStr, BaseField) _bases = (pydantic.ConstrainedStr, BaseField)
_type = str _type = str
def __new__( def __new__( # noqa CFQ002
cls, cls,
*, *,
allow_blank: bool = False, allow_blank: bool = False,
@ -231,7 +231,7 @@ class Decimal(ModelFieldFactory):
_bases = (pydantic.ConstrainedDecimal, BaseField) _bases = (pydantic.ConstrainedDecimal, BaseField)
_type = decimal.Decimal _type = decimal.Decimal
def __new__( def __new__( # noqa CFQ002
cls, cls,
*, *,
minimum: float = None, minimum: float = None,

View File

@ -15,7 +15,7 @@ from ormar.relations import AliasManager
if TYPE_CHECKING: # pragma no cover if TYPE_CHECKING: # pragma no cover
from ormar import Model from ormar import Model
relationship_manager = AliasManager() alias_manager = AliasManager()
class ModelMeta: class ModelMeta:
@ -30,7 +30,7 @@ class ModelMeta:
def register_relation_on_build(table_name: str, field: ForeignKey) -> None: def register_relation_on_build(table_name: str, field: ForeignKey) -> None:
relationship_manager.add_relation_type(field, table_name) alias_manager.add_relation_type(field, table_name)
def reverse_field_not_already_registered( def reverse_field_not_already_registered(
@ -193,7 +193,7 @@ class ModelMetaclass(pydantic.main.ModelMetaclass):
mcs, name, bases, attrs mcs, name, bases, attrs
) )
new_model.Meta.alias_manager = relationship_manager new_model.Meta.alias_manager = alias_manager
new_model.objects = QuerySet(new_model) new_model.objects = QuerySet(new_model)
return new_model return new_model