ramifice 0.8.32__py3-none-any.whl → 0.8.34__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. ramifice/__init__.py +2 -0
  2. ramifice/commons/__init__.py +2 -0
  3. ramifice/commons/general.py +2 -0
  4. ramifice/commons/indexes.py +6 -6
  5. ramifice/commons/many.py +2 -0
  6. ramifice/commons/one.py +2 -0
  7. ramifice/commons/tools.py +7 -5
  8. ramifice/commons/unit_manager.py +2 -0
  9. ramifice/fields/__init__.py +2 -0
  10. ramifice/fields/bool_field.py +2 -0
  11. ramifice/fields/choice_float_dyn_field.py +2 -0
  12. ramifice/fields/choice_float_field.py +2 -0
  13. ramifice/fields/choice_float_mult_dyn_field.py +2 -0
  14. ramifice/fields/choice_float_mult_field.py +2 -0
  15. ramifice/fields/choice_int_dyn_field.py +2 -0
  16. ramifice/fields/choice_int_field.py +2 -0
  17. ramifice/fields/choice_int_mult_dyn_field.py +2 -0
  18. ramifice/fields/choice_int_mult_field.py +2 -0
  19. ramifice/fields/choice_text_dyn_field.py +2 -0
  20. ramifice/fields/choice_text_field.py +2 -0
  21. ramifice/fields/choice_text_mult_dyn_field.py +2 -0
  22. ramifice/fields/choice_text_mult_field.py +2 -0
  23. ramifice/fields/color_field.py +2 -0
  24. ramifice/fields/date_field.py +6 -6
  25. ramifice/fields/date_time_field.py +6 -6
  26. ramifice/fields/email_field.py +2 -0
  27. ramifice/fields/file_field.py +4 -2
  28. ramifice/fields/float_field.py +2 -0
  29. ramifice/fields/general/choice_group.py +2 -0
  30. ramifice/fields/general/date_group.py +2 -0
  31. ramifice/fields/general/field.py +2 -0
  32. ramifice/fields/general/file_group.py +2 -0
  33. ramifice/fields/general/number_group.py +2 -0
  34. ramifice/fields/general/text_group.py +2 -0
  35. ramifice/fields/id_field.py +2 -0
  36. ramifice/fields/image_field.py +5 -3
  37. ramifice/fields/integer_field.py +2 -0
  38. ramifice/fields/ip_field.py +2 -0
  39. ramifice/fields/password_field.py +5 -3
  40. ramifice/fields/phone_field.py +3 -1
  41. ramifice/fields/slug_field.py +2 -0
  42. ramifice/fields/text_field.py +3 -1
  43. ramifice/fields/url_field.py +2 -0
  44. ramifice/models/decorator.py +4 -2
  45. ramifice/models/model.py +2 -1
  46. ramifice/paladins/__init__.py +2 -0
  47. ramifice/paladins/add_valid.py +2 -0
  48. ramifice/paladins/check.py +2 -0
  49. ramifice/paladins/delete.py +2 -0
  50. ramifice/paladins/groups/__init__.py +2 -0
  51. ramifice/paladins/groups/bool_group.py +2 -0
  52. ramifice/paladins/groups/choice_group.py +2 -0
  53. ramifice/paladins/groups/date_group.py +7 -4
  54. ramifice/paladins/groups/file_group.py +20 -16
  55. ramifice/paladins/groups/id_group.py +2 -0
  56. ramifice/paladins/groups/img_group.py +20 -16
  57. ramifice/paladins/groups/num_group.py +8 -2
  58. ramifice/paladins/groups/pass_group.py +3 -1
  59. ramifice/paladins/groups/slug_group.py +2 -0
  60. ramifice/paladins/groups/text_group.py +5 -1
  61. ramifice/paladins/hooks.py +2 -0
  62. ramifice/paladins/indexing.py +2 -0
  63. ramifice/paladins/password.py +4 -3
  64. ramifice/paladins/refrash.py +2 -0
  65. ramifice/paladins/save.py +2 -0
  66. ramifice/paladins/tools.py +2 -0
  67. ramifice/paladins/validation.py +2 -0
  68. ramifice/utils/constants.py +2 -0
  69. ramifice/utils/errors.py +5 -3
  70. ramifice/utils/fixtures.py +4 -1
  71. ramifice/utils/migration.py +2 -0
  72. ramifice/utils/mixins.py +2 -0
  73. ramifice/utils/tools.py +5 -9
  74. ramifice/utils/translations.py +4 -2
  75. ramifice/utils/unit.py +2 -0
  76. {ramifice-0.8.32.dist-info → ramifice-0.8.34.dist-info}/METADATA +4 -4
  77. ramifice-0.8.34.dist-info/RECORD +83 -0
  78. ramifice-0.8.32.dist-info/RECORD +0 -83
  79. {ramifice-0.8.32.dist-info → ramifice-0.8.34.dist-info}/WHEEL +0 -0
  80. {ramifice-0.8.32.dist-info → ramifice-0.8.34.dist-info}/licenses/LICENSE +0 -0
ramifice/__init__.py CHANGED
@@ -21,6 +21,8 @@ a simplified alternative (Types of selective fields with dynamic addition of ele
21
21
  The project is more concentrated for web development or for applications with a graphic interface.
22
22
  """
23
23
 
24
+ from __future__ import annotations
25
+
24
26
  __all__ = (
25
27
  "NamedTuple",
26
28
  "to_human_size",
@@ -1,5 +1,7 @@
1
1
  """Commons - Model class methods."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("QCommonsMixin",)
4
6
 
5
7
  from ramifice.commons.general import GeneralMixin
@@ -1,5 +1,7 @@
1
1
  """General purpose query methods."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("GeneralMixin",)
4
6
 
5
7
  from typing import Any
@@ -1,5 +1,7 @@
1
1
  """Indexation documents of collection."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("IndexMixin",)
4
6
 
5
7
  from typing import Any
@@ -93,9 +95,8 @@ class IndexMixin:
93
95
  """Get information on this collection’s indexes."""
94
96
  # Get collection for current model.
95
97
  collection: AsyncCollection = constants.MONGO_DATABASE[cls.META["collection_name"]]
96
- # Get information.
97
- result = await collection.index_information(session=session, comment=comment)
98
- return result
98
+ #
99
+ return await collection.index_information(session=session, comment=comment)
99
100
 
100
101
  @classmethod
101
102
  async def list_indexes(
@@ -106,6 +107,5 @@ class IndexMixin:
106
107
  """Get a cursor over the index documents for this collection."""
107
108
  # Get collection for current model.
108
109
  collection: AsyncCollection = constants.MONGO_DATABASE[cls.META["collection_name"]]
109
- # Get cursor.
110
- cursor = await collection.list_indexes(session=session, comment=comment)
111
- return cursor
110
+ #
111
+ return await collection.list_indexes(session=session, comment=comment)
ramifice/commons/many.py CHANGED
@@ -1,5 +1,7 @@
1
1
  """Queries like `find many`."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("ManyMixin",)
4
6
 
5
7
  import logging
ramifice/commons/one.py CHANGED
@@ -1,5 +1,7 @@
1
1
  """Requests like `find one`."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("OneMixin",)
4
6
 
5
7
  import logging
ramifice/commons/tools.py CHANGED
@@ -1,5 +1,7 @@
1
1
  """Tool of Commons - A set of auxiliary methods."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = (
4
6
  "correct_mongo_filter",
5
7
  "password_to_none",
@@ -31,7 +33,7 @@ def password_to_none(
31
33
  ) -> dict[str, Any]:
32
34
  """Create object instance from Mongo document."""
33
35
  for f_name, t_name in field_name_and_type.items():
34
- if "PasswordField" == t_name:
36
+ if t_name == "PasswordField":
35
37
  mongo_doc[f_name] = None
36
38
  return mongo_doc
37
39
 
@@ -44,10 +46,10 @@ def mongo_doc_to_raw_doc(
44
46
  """Convert the Mongo document to the raw document.
45
47
 
46
48
  Special changes:
47
- _id to str
48
- password to None
49
- date to str
50
- datetime to str
49
+ - `_id to str`
50
+ - `password to None`
51
+ - `date to str`
52
+ - `datetime to str`
51
53
  """
52
54
  doc: dict[str, Any] = {}
53
55
  for f_name, f_data in inst_model_dict.items():
@@ -3,6 +3,8 @@
3
3
  Management for `choices` parameter in dynamic field types.
4
4
  """
5
5
 
6
+ from __future__ import annotations
7
+
6
8
  __all__ = ("UnitMixin",)
7
9
 
8
10
  import logging
@@ -1,5 +1,7 @@
1
1
  """Available field types."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = (
4
6
  "BooleanField",
5
7
  "ChoiceFloatDynField",
@@ -1,5 +1,7 @@
1
1
  """Field of Model for enter boolean value."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("BooleanField",)
4
6
 
5
7
  import logging
@@ -3,6 +3,8 @@
3
3
  Type of selective float field with dynamic addition of elements.
4
4
  """
5
5
 
6
+ from __future__ import annotations
7
+
6
8
  __all__ = ("ChoiceFloatDynField",)
7
9
 
8
10
  import logging
@@ -3,6 +3,8 @@
3
3
  Type of selective float field with static of elements.
4
4
  """
5
5
 
6
+ from __future__ import annotations
7
+
6
8
  __all__ = ("ChoiceFloatField",)
7
9
 
8
10
  import logging
@@ -3,6 +3,8 @@
3
3
  Type of selective float field with dynamic addition of elements.
4
4
  """
5
5
 
6
+ from __future__ import annotations
7
+
6
8
  __all__ = ("ChoiceFloatMultDynField",)
7
9
 
8
10
  import logging
@@ -3,6 +3,8 @@
3
3
  Type of selective float field with static of elements.
4
4
  """
5
5
 
6
+ from __future__ import annotations
7
+
6
8
  __all__ = ("ChoiceFloatMultField",)
7
9
 
8
10
  import logging
@@ -3,6 +3,8 @@
3
3
  Type of selective integer field with dynamic addition of elements.
4
4
  """
5
5
 
6
+ from __future__ import annotations
7
+
6
8
  __all__ = ("ChoiceIntDynField",)
7
9
 
8
10
  import logging
@@ -3,6 +3,8 @@
3
3
  Type of selective integer field with static of elements.
4
4
  """
5
5
 
6
+ from __future__ import annotations
7
+
6
8
  __all__ = ("ChoiceIntField",)
7
9
 
8
10
  import logging
@@ -3,6 +3,8 @@
3
3
  Type of selective integer field with dynamic addition of elements.
4
4
  """
5
5
 
6
+ from __future__ import annotations
7
+
6
8
  __all__ = ("ChoiceIntMultDynField",)
7
9
 
8
10
  import logging
@@ -3,6 +3,8 @@
3
3
  Type of selective integer field with static of elements.
4
4
  """
5
5
 
6
+ from __future__ import annotations
7
+
6
8
  __all__ = ("ChoiceIntMultField",)
7
9
 
8
10
  import logging
@@ -3,6 +3,8 @@
3
3
  Type of selective text field with dynamic addition of elements.
4
4
  """
5
5
 
6
+ from __future__ import annotations
7
+
6
8
  __all__ = ("ChoiceTextDynField",)
7
9
 
8
10
  import logging
@@ -3,6 +3,8 @@
3
3
  Type of selective text field with static of elements.
4
4
  """
5
5
 
6
+ from __future__ import annotations
7
+
6
8
  __all__ = ("ChoiceTextField",)
7
9
 
8
10
  import logging
@@ -3,6 +3,8 @@
3
3
  Type of selective text field with dynamic addition of elements.
4
4
  """
5
5
 
6
+ from __future__ import annotations
7
+
6
8
  __all__ = ("ChoiceTextMultDynField",)
7
9
 
8
10
  import logging
@@ -3,6 +3,8 @@
3
3
  Type of selective text field with static of elements.
4
4
  """
5
5
 
6
+ from __future__ import annotations
7
+
6
8
  __all__ = ("ChoiceTextMultField",)
7
9
 
8
10
  import logging
@@ -1,5 +1,7 @@
1
1
  """Field of Model for enter color code."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("ColorField",)
4
6
 
5
7
  import logging
@@ -1,5 +1,7 @@
1
1
  """Field of Model for enter date."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("DateField",)
4
6
 
5
7
  import logging
@@ -52,12 +54,10 @@ class DateField(Field, DateGroup):
52
54
  ) -> None:
53
55
  if constants.DEBUG:
54
56
  try:
55
- if max_date is not None:
56
- if not isinstance(max_date, datetime):
57
- raise AssertionError("Parameter `max_date` - Not а `str` type!")
58
- if min_date is not None:
59
- if not isinstance(min_date, datetime):
60
- raise AssertionError("Parameter `min_date` - Not а `str` type!")
57
+ if max_date is not None and not isinstance(max_date, datetime):
58
+ raise AssertionError("Parameter `max_date` - Not а `str` type!")
59
+ if min_date is not None and not isinstance(min_date, datetime):
60
+ raise AssertionError("Parameter `min_date` - Not а `str` type!")
61
61
  if max_date is not None and min_date is not None and max_date <= min_date:
62
62
  raise AssertionError("The `max_date` parameter should be more than the `min_date`!")
63
63
  if default is not None:
@@ -1,5 +1,7 @@
1
1
  """Field of Model for enter date and time."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("DateTimeField",)
4
6
 
5
7
  import logging
@@ -52,12 +54,10 @@ class DateTimeField(Field, DateGroup):
52
54
  ) -> None:
53
55
  if constants.DEBUG:
54
56
  try:
55
- if max_date is not None:
56
- if not isinstance(max_date, datetime):
57
- raise AssertionError("Parameter `max_date` - Not а `str` type!")
58
- if min_date is not None:
59
- if not isinstance(min_date, datetime):
60
- raise AssertionError("Parameter `min_date` - Not а `str` type!")
57
+ if max_date is not None and not isinstance(max_date, datetime):
58
+ raise AssertionError("Parameter `max_date` - Not а `str` type!")
59
+ if min_date is not None and not isinstance(min_date, datetime):
60
+ raise AssertionError("Parameter `min_date` - Not а `str` type!")
61
61
  if max_date is not None and min_date is not None and max_date <= min_date:
62
62
  raise AssertionError("The `max_date` parameter should be more than the `min_date`!")
63
63
  if default is not None:
@@ -1,5 +1,7 @@
1
1
  """Field of Model for enter email address."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("EmailField",)
4
6
 
5
7
  import logging
@@ -1,5 +1,7 @@
1
1
  """Field of Model for upload file."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("FileField",)
4
6
 
5
7
  import logging
@@ -7,7 +9,7 @@ import uuid
7
9
  from base64 import b64decode
8
10
  from datetime import datetime
9
11
  from os import makedirs
10
- from os.path import basename, exists, getsize
12
+ from os.path import exists, getsize
11
13
  from shutil import copyfile
12
14
 
13
15
  from anyio import Path, open_file, to_thread
@@ -211,7 +213,7 @@ class FileField(Field, FileGroup, JsonMixin):
211
213
  file_info["path"] = f_target_path
212
214
  file_info["url"] = f"{MEDIA_URL}/uploads/{self.target_dir}/{date_str}/{f_uuid_name}"
213
215
  # Add original file name.
214
- file_info["name"] = basename(src_path)
216
+ file_info["name"] = Path(src_path).name
215
217
  # Add file extension.
216
218
  file_info["extension"] = extension
217
219
  # Add file size (in bytes).
@@ -1,5 +1,7 @@
1
1
  """Field of Model for enter (float) number."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("FloatField",)
4
6
 
5
7
  import logging
@@ -1,5 +1,7 @@
1
1
  """General additional parameters for choice fields."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("ChoiceGroup",)
4
6
 
5
7
 
@@ -1,5 +1,7 @@
1
1
  """General additional parameters for date|datetime fields."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("DateGroup",)
4
6
 
5
7
  from datetime import datetime
@@ -1,5 +1,7 @@
1
1
  """General parameters for all types fields of Model."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("Field",)
4
6
 
5
7
 
@@ -1,5 +1,7 @@
1
1
  """General additional parameters for file fields."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("FileGroup",)
4
6
 
5
7
 
@@ -1,5 +1,7 @@
1
1
  """General additional parameters for number fields."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("NumberGroup",)
4
6
 
5
7
 
@@ -1,5 +1,7 @@
1
1
  """General additional parameters for text fields."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("TextGroup",)
4
6
 
5
7
 
@@ -1,5 +1,7 @@
1
1
  """Field of Model for enter identifier of document."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("IDField",)
4
6
 
5
7
  import logging
@@ -1,5 +1,7 @@
1
1
  """Field of Model for upload image."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("ImageField",)
4
6
 
5
7
  import logging
@@ -7,7 +9,7 @@ import uuid
7
9
  from base64 import b64decode
8
10
  from datetime import datetime
9
11
  from os import makedirs
10
- from os.path import basename, exists, getsize
12
+ from os.path import exists, getsize
11
13
  from shutil import copyfile
12
14
 
13
15
  from anyio import Path, open_file, to_thread
@@ -77,7 +79,7 @@ class ImageField(Field, FileGroup, JsonMixin):
77
79
  raise AssertionError("The `thumbnails` parameter should not contain an empty dictionary!")
78
80
  size_name_list = ["lg", "md", "sm", "xs"]
79
81
  curr_size_thumb: int = 0
80
- for size_name in thumbnails.keys():
82
+ for size_name in thumbnails:
81
83
  if size_name not in size_name_list:
82
84
  raise AssertionError(
83
85
  f"The `thumbnails` parameter contains an unacceptable size name `{size_name}`!\n"
@@ -256,7 +258,7 @@ class ImageField(Field, FileGroup, JsonMixin):
256
258
  img_info["path"] = main_img_path
257
259
  img_info["url"] = f"{imgs_dir_url}/{new_original_name}"
258
260
  # Add original image name.
259
- img_info["name"] = basename(src_path)
261
+ img_info["name"] = Path(src_path).name
260
262
  # Add image extension.
261
263
  img_info["extension"] = extension
262
264
  # Transform extension to the upper register and delete the point.
@@ -1,5 +1,7 @@
1
1
  """Field of Model for enter (int) number."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("IntegerField",)
4
6
 
5
7
  import logging
@@ -1,5 +1,7 @@
1
1
  """Field of Model for enter IP address."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("IPField",)
4
6
 
5
7
  import ipaddress
@@ -1,5 +1,7 @@
1
1
  """Field of Model for enter password."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("PasswordField",)
4
6
 
5
7
  import logging
@@ -17,9 +19,9 @@ class PasswordField(Field):
17
19
  r"""Field of Model for enter password.
18
20
 
19
21
  Attention:
20
- - Regular expression: ^[-._!"`'#%&,:;<>=@{}~$()*+/\\?[]^|a-zA-Z0-9]{8,256}$
21
- - Valid characters: a-z A-Z 0-9 - . _ ! " ` ' # % & , : ; < > = @ { } ~ $ ( ) * + / \\ ? [ ] ^ |
22
- - Number of characters: from 8 to 256.
22
+ - `Regular expression:` ^[-._!"`'#%&,:;<>=@{}~$()*+/\\?[]^|a-zA-Z0-9]{8,256}$
23
+ - `Valid characters:` a-z A-Z 0-9 - . _ ! " ` ' # % & , : ; < > = @ { } ~ $ ( ) * + / \\ ? [ ] ^ |
24
+ - `Number of characters:` from 8 to 256.
23
25
 
24
26
  Agrs:
25
27
  label: Text label for a web form field.
@@ -1,5 +1,7 @@
1
1
  """Field of Model for enter phone number."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("PhoneField",)
4
6
 
5
7
  import logging
@@ -18,7 +20,7 @@ class PhoneField(Field, TextGroup, JsonMixin):
18
20
  """Field of Model for enter phone number.
19
21
 
20
22
  Attention:
21
- By default is used validator `phonenumbers.is_valid_number()`.
23
+ By default is used validator `phonenumbers.is_valid_number()`.
22
24
 
23
25
  Agrs:
24
26
  label: Text label for a web form field.
@@ -1,5 +1,7 @@
1
1
  """Field of Model for automatic generation of string `slug`."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("SlugField",)
4
6
 
5
7
  import logging
@@ -1,5 +1,7 @@
1
1
  """Field of Model for enter text."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("TextField",)
4
6
 
5
7
  import logging
@@ -117,7 +119,7 @@ class TextField(Field, JsonMixin):
117
119
  value = self.value
118
120
  if isinstance(value, str):
119
121
  return len(value)
120
- elif isinstance(value, dict):
122
+ if isinstance(value, dict):
121
123
  count = 0
122
124
  for text in value.values():
123
125
  tmp = len(text)
@@ -1,5 +1,7 @@
1
1
  """Field of Model for enter URL address."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("URLField",)
4
6
 
5
7
  import logging
@@ -1,10 +1,12 @@
1
1
  """Decorator for converting Python classes into Ramifice models."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("model",)
4
6
 
5
7
  import logging
6
8
  import re
7
- from os.path import exists
9
+ from pathlib import Path
8
10
  from typing import Any
9
11
 
10
12
  from ramifice.commons import QCommonsMixin
@@ -58,7 +60,7 @@ def model(
58
60
  if fixture_name is not None:
59
61
  fixture_path = f"config/fixtures/{fixture_name}.yml"
60
62
 
61
- if not exists(fixture_path):
63
+ if not Path(fixture_path).exists():
62
64
  msg = (
63
65
  f"Model: `{cls.__module__}.{cls.__name__}` > "
64
66
  + "META param: `fixture_name` => "
ramifice/models/model.py CHANGED
@@ -1,5 +1,7 @@
1
1
  """Converting Python classes into Ramifice Models."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("Model",)
4
6
 
5
7
  from abc import abstractmethod
@@ -56,7 +58,6 @@ class Model:
56
58
  @abstractmethod
57
59
  def fields(self) -> None:
58
60
  """Adding fields."""
59
- pass
60
61
 
61
62
  def model_name(self) -> str:
62
63
  """Get Model name - Class name."""
@@ -15,6 +15,8 @@ This module provides:
15
15
  - `print_err`: Printing errors to console.
16
16
  """
17
17
 
18
+ from __future__ import annotations
19
+
18
20
  __all__ = ("QPaladinsMixin",)
19
21
 
20
22
  from ramifice.paladins.add_valid import AddValidMixin
@@ -1,5 +1,7 @@
1
1
  """AddValidMixin - Contains an abstract method for additional validation of fields."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("AddValidMixin",)
4
6
 
5
7
  from abc import abstractmethod
@@ -1,5 +1,7 @@
1
1
  """Validation of Model data before saving to the database."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("CheckMixin",)
4
6
 
5
7
  import logging
@@ -1,5 +1,7 @@
1
1
  """Delete document from database."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = ("DeleteMixin",)
4
6
 
5
7
  import logging
@@ -1,5 +1,7 @@
1
1
  """Groups - Model instance methods for specific processing of fields."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  __all__ = (
4
6
  "BoolGroupMixin",
5
7
  "ChoiceGroupMixin",
@@ -4,6 +4,8 @@ Supported fields:
4
4
  BooleanField
5
5
  """
6
6
 
7
+ from __future__ import annotations
8
+
7
9
  __all__ = ("BoolGroupMixin",)
8
10
 
9
11
  from typing import Any