Added poetry integration.

Description:
* Fixed github actions;
* Removed requirements.txt;
* Fixed CONTRIBUTING.md;
* Fixed black and flake8.

Signed-off-by: Pavel <win10@list.ru>
This commit is contained in:
Pavel
2021-10-08 15:57:22 +04:00
parent 80c6ff38a1
commit b2541bed1e
52 changed files with 2685 additions and 377 deletions

View File

@ -5,7 +5,7 @@ Gathers all exceptions thrown by ormar.
class AsyncOrmException(Exception):
"""
Base ormar Exception
Base ormar Exception
"""
pass
@ -13,13 +13,13 @@ class AsyncOrmException(Exception):
class ModelDefinitionError(AsyncOrmException):
"""
Raised for errors related to the model definition itself:
Raised for errors related to the model definition itself:
* setting @property_field on method with arguments other than func(self)
* defining a Field without required parameters
* defining a model with more than one primary_key
* defining a model without primary_key
* setting primary_key column as pydantic_only
* setting @property_field on method with arguments other than func(self)
* defining a Field without required parameters
* defining a model with more than one primary_key
* defining a model without primary_key
* setting primary_key column as pydantic_only
"""
pass
@ -27,7 +27,7 @@ class ModelDefinitionError(AsyncOrmException):
class ModelError(AsyncOrmException):
"""
Raised for initialization of model with non-existing field keyword.
Raised for initialization of model with non-existing field keyword.
"""
pass
@ -35,7 +35,7 @@ class ModelError(AsyncOrmException):
class NoMatch(AsyncOrmException):
"""
Raised for database queries that has no matching result (empty result).
Raised for database queries that has no matching result (empty result).
"""
pass
@ -43,8 +43,8 @@ class NoMatch(AsyncOrmException):
class MultipleMatches(AsyncOrmException):
"""
Raised for database queries that should return one row (i.e. get, first etc.)
but has multiple matching results in response.
Raised for database queries that should return one row (i.e. get, first etc.)
but has multiple matching results in response.
"""
pass
@ -52,11 +52,11 @@ class MultipleMatches(AsyncOrmException):
class QueryDefinitionError(AsyncOrmException):
"""
Raised for errors in query definition:
Raised for errors in query definition:
* using contains or icontains filter with instance of the Model
* using Queryset.update() without filter and setting each flag to True
* using Queryset.delete() without filter and setting each flag to True
* using contains or icontains filter with instance of the Model
* using Queryset.update() without filter and setting each flag to True
* using Queryset.delete() without filter and setting each flag to True
"""
pass
@ -68,8 +68,8 @@ class RelationshipInstanceError(AsyncOrmException):
class ModelPersistenceError(AsyncOrmException):
"""
Raised for update of models without primary_key set (cannot retrieve from db)
or for saving a model with relation to unsaved model (cannot extract fk value).
Raised for update of models without primary_key set (cannot retrieve from db)
or for saving a model with relation to unsaved model (cannot extract fk value).
"""
pass
@ -77,7 +77,7 @@ class ModelPersistenceError(AsyncOrmException):
class SignalDefinitionError(AsyncOrmException):
"""
Raised when non callable receiver is passed as signal callback.
Raised when non callable receiver is passed as signal callback.
"""
pass