python-checks 0.2.0__tar.gz → 0.3.0__tar.gz
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.
- {python_checks-0.2.0 → python_checks-0.3.0}/PKG-INFO +5 -1
- {python_checks-0.2.0 → python_checks-0.3.0}/README.md +4 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/pyproject.toml +1 -1
- {python_checks-0.2.0 → python_checks-0.3.0}/pyproject.toml.orig +1 -1
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/contracts/_render.py +7 -4
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/contracts/_settings.py +4 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/LICENSE +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/__init__.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/__init__.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/_kind.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/_location.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/_names.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/api/__init__.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/api/_endpoint_declarations.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/api/_marker.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/calls/__init__.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/calls/_confined_functions.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/calls/_marker.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/database/__init__.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/database/_bound_checks.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/database/_confined_calls.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/database/_marker.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/database/_model_boundary.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/database/_model_columns.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/database/_raw_sql.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/database/_schema_drift.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/database/_statement_keys.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/effects/__init__.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/effects/_determinism.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/effects/_log_events.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/effects/_marker.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/hygiene/__init__.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/hygiene/_dependency_bounds.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/hygiene/_marker.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/imports/__init__.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/imports/_confined.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/imports/_marker.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/imports/_sealed.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/imports/_statements.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/placement/__init__.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/placement/_class_modules.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/placement/_class_placement.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/placement/_marker.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/placement/_operation_shape.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/placement/_required_class.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/signatures/__init__.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/signatures/_function_length.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/signatures/_functions.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/signatures/_keyword_only.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/signatures/_marker.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/signatures/_module_length.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/signatures/_nesting.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/signatures/_signature_layout.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/types/__init__.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/types/_annotation_shapes.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/types/_config_fields.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/types/_confined_types.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/types/_constant_annotations.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/types/_frozen_dataclasses.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/types/_marker.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/cli/__init__.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/cli/_app.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/cli/_protocols.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/cli/commands/__init__.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/cli/commands/_explain.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/cli/commands/_list.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/cli/commands/_run.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/cli/commands/_summary.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/cli/commands/_sync.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/config/__init__.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/config/_base.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/config/_config.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/config/_constants.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/config/_errors.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/config/_loader.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/config/_toml.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/contracts/__init__.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/contracts/_constants.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/contracts/_layout.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/core/__init__.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/core/_constants.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/core/_discovery.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/core/_edit.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/core/_errors.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/core/_fixer.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/core/_format.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/core/_markers.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/core/_protocols.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/core/_registry.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/core/_report.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/core/_runner.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/core/_settings.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/core/_source.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/core/_violation.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/environment/__init__.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/environment/_constants.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/environment/_render.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/environment/_settings.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/py.typed +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/sync/__init__.py +0 -0
- {python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/sync/_sync.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-checks
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Проверки архитектурных соглашений проекта
|
|
5
5
|
Author: Armontex
|
|
6
6
|
Author-email: Armontex <windle1337@gmail.com>
|
|
@@ -233,6 +233,10 @@ py-checks sync --check # упасть, если файл отстал
|
|
|
233
233
|
которого нет, в контракт не попадает — иначе import-linter упал бы на первом же
|
|
234
234
|
несуществующем модуле. Гоняет граф по собранному файлу хук самого import-linter.
|
|
235
235
|
|
|
236
|
+
Шапку собранного файла можно написать свою — `header` в `[contracts]`, вместе
|
|
237
|
+
с `#`; как и у `.env.example`, нужна она проекту с комментариями на другом
|
|
238
|
+
языке.
|
|
239
|
+
|
|
236
240
|
## Пример окружения
|
|
237
241
|
|
|
238
242
|
Имя переменной знает поле настроек — оно объявляет его `validation_alias`, и
|
|
@@ -217,6 +217,10 @@ py-checks sync --check # упасть, если файл отстал
|
|
|
217
217
|
которого нет, в контракт не попадает — иначе import-linter упал бы на первом же
|
|
218
218
|
несуществующем модуле. Гоняет граф по собранному файлу хук самого import-linter.
|
|
219
219
|
|
|
220
|
+
Шапку собранного файла можно написать свою — `header` в `[contracts]`, вместе
|
|
221
|
+
с `#`; как и у `.env.example`, нужна она проекту с комментариями на другом
|
|
222
|
+
языке.
|
|
223
|
+
|
|
220
224
|
## Пример окружения
|
|
221
225
|
|
|
222
226
|
Имя переменной знает поле настроек — оно объявляет его `validation_alias`, и
|
|
@@ -45,12 +45,15 @@ def render(
|
|
|
45
45
|
)
|
|
46
46
|
if not blocks:
|
|
47
47
|
return None
|
|
48
|
+
head = contracts(config=config).header.strip() or HEADER.format(
|
|
49
|
+
# Секция зовётся по-разному в манифесте и в своём файле настроек:
|
|
50
|
+
# написать одно имя значит послать читателя не туда в половине
|
|
51
|
+
# проектов.
|
|
52
|
+
section=f"{prefix(source=config.origin)}{SECTION}"
|
|
53
|
+
)
|
|
48
54
|
return "\n".join(
|
|
49
55
|
[
|
|
50
|
-
|
|
51
|
-
# написать одно имя значит послать читателя не туда в половине
|
|
52
|
-
# проектов.
|
|
53
|
-
HEADER.format(section=f"{prefix(source=config.origin)}{SECTION}"),
|
|
56
|
+
f"{head.rstrip()}\n",
|
|
54
57
|
_roots(
|
|
55
58
|
root=root,
|
|
56
59
|
package=name,
|
|
@@ -24,10 +24,14 @@ class Contracts(CheckSettings):
|
|
|
24
24
|
собой, и это вся их работа. Перечислять их отдельно нужно затем, чтобы они
|
|
25
25
|
попали в запреты остальных: слой, о котором таблица не знает, ничьим
|
|
26
26
|
запретом не становится.
|
|
27
|
+
|
|
28
|
+
`header` — шапка собранного файла со своим текстом, вместе с `#`. Пустая
|
|
29
|
+
строка оставляет шапку библиотеки.
|
|
27
30
|
"""
|
|
28
31
|
|
|
29
32
|
composition_root: tuple[str, ...] = ()
|
|
30
33
|
layers: dict[str, tuple[str, ...]] = {}
|
|
34
|
+
header: str = ""
|
|
31
35
|
|
|
32
36
|
|
|
33
37
|
def contracts(*, config: Config) -> Contracts:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/api/_endpoint_declarations.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/calls/_confined_functions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/database/_confined_calls.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/database/_model_boundary.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/database/_statement_keys.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/hygiene/_dependency_bounds.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/placement/_class_modules.py
RENAMED
|
File without changes
|
{python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/placement/_class_placement.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/placement/_operation_shape.py
RENAMED
|
File without changes
|
{python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/placement/_required_class.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/signatures/_function_length.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/signatures/_keyword_only.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/signatures/_module_length.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/signatures/_signature_layout.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/types/_annotation_shapes.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/types/_constant_annotations.py
RENAMED
|
File without changes
|
{python_checks-0.2.0 → python_checks-0.3.0}/src/py_checks/checks/types/_frozen_dataclasses.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|