ae-base 0.3.74__py3-none-any.whl → 0.3.76__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.
- ae/base.py +35 -4
- {ae_base-0.3.74.dist-info → ae_base-0.3.76.dist-info}/METADATA +5 -7
- ae_base-0.3.76.dist-info/RECORD +7 -0
- {ae_base-0.3.74.dist-info → ae_base-0.3.76.dist-info}/licenses/LICENSE.md +1 -1
- ae_base-0.3.74.dist-info/RECORD +0 -7
- {ae_base-0.3.74.dist-info → ae_base-0.3.76.dist-info}/WHEEL +0 -0
- {ae_base-0.3.74.dist-info → ae_base-0.3.76.dist-info}/top_level.txt +0 -0
- {ae_base-0.3.74.dist-info → ae_base-0.3.76.dist-info}/zip-safe +0 -0
ae/base.py
CHANGED
|
@@ -248,7 +248,7 @@ from types import ModuleType
|
|
|
248
248
|
from typing import Any, Callable, Container, Generator, Iterable, MutableMapping, Optional, Union, cast
|
|
249
249
|
|
|
250
250
|
|
|
251
|
-
__version__ = '0.3.
|
|
251
|
+
__version__ = '0.3.76'
|
|
252
252
|
|
|
253
253
|
|
|
254
254
|
os_path_abspath = os.path.abspath
|
|
@@ -356,13 +356,13 @@ def app_name_guess() -> str:
|
|
|
356
356
|
"""
|
|
357
357
|
app_name = build_config_variable_values(('package.name', ""))[0]
|
|
358
358
|
if not app_name:
|
|
359
|
-
|
|
359
|
+
unspecified_names = ('ae_base', 'app', '_jb_pytest_runner', 'main', '__main__', 'pydevconsole', 'pytest', 'src')
|
|
360
360
|
path = sys.argv[0]
|
|
361
361
|
app_name = os_path_splitext(os_path_basename(path))[0]
|
|
362
|
-
if app_name.lower() in
|
|
362
|
+
if app_name.lower() in unspecified_names:
|
|
363
363
|
path = os.getcwd()
|
|
364
364
|
app_name = os_path_basename(path)
|
|
365
|
-
if app_name.lower() in
|
|
365
|
+
if app_name.lower() in unspecified_names:
|
|
366
366
|
app_name = "unguessable"
|
|
367
367
|
return defuse(app_name)
|
|
368
368
|
|
|
@@ -1152,6 +1152,37 @@ def parse_dotenv(file_path: str, late_resolved: EnvVarsLateResolvedType, exclude
|
|
|
1152
1152
|
return env_vars
|
|
1153
1153
|
|
|
1154
1154
|
|
|
1155
|
+
def pep8_format(value: Any, indent_level: int = 0):
|
|
1156
|
+
""" PEP-8-conform representation code string of deep dict/list structures, superseding :func:`pprint.pformat`.
|
|
1157
|
+
|
|
1158
|
+
:param value: value to format PEP-8-conform (hanging indent always with 4 spaces)..
|
|
1159
|
+
:param indent_level: level of indentation. pass e.g. 1 to indent the output with 4 spaces.
|
|
1160
|
+
:return: representation string of the specified value.
|
|
1161
|
+
"""
|
|
1162
|
+
spaces = " " * 4 # PEP-8: 4 spaces
|
|
1163
|
+
indent_spaces = spaces * indent_level
|
|
1164
|
+
|
|
1165
|
+
parts = []
|
|
1166
|
+
if value and isinstance(value, dict):
|
|
1167
|
+
parts.append("{")
|
|
1168
|
+
for key, val in value.items():
|
|
1169
|
+
formatted = pep8_format(val, indent_level=indent_level + 1)
|
|
1170
|
+
parts.append(f"{indent_spaces}{spaces}{repr(key)}: {formatted},")
|
|
1171
|
+
parts.append(indent_spaces + "}")
|
|
1172
|
+
|
|
1173
|
+
elif value and isinstance(value, list):
|
|
1174
|
+
parts.append("[")
|
|
1175
|
+
for item in value:
|
|
1176
|
+
formatted = pep8_format(item, indent_level + 1)
|
|
1177
|
+
parts.append(f"{indent_spaces}{spaces}{formatted},")
|
|
1178
|
+
parts.append(indent_spaces + "]")
|
|
1179
|
+
|
|
1180
|
+
else:
|
|
1181
|
+
parts.append(repr(value))
|
|
1182
|
+
|
|
1183
|
+
return "\n".join(parts)
|
|
1184
|
+
|
|
1185
|
+
|
|
1155
1186
|
def project_main_file(import_name: str, project_path: str = "") -> str:
|
|
1156
1187
|
""" determine the main module file path of a project package containing the project __version__ module variable.
|
|
1157
1188
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ae_base
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.76
|
|
4
4
|
Summary: ae namespace module portion base: basic constants, helper functions and context managers
|
|
5
5
|
Home-page: https://gitlab.com/ae-group/ae_base
|
|
6
6
|
Author: AndiEcker
|
|
@@ -19,7 +19,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
20
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
21
|
Classifier: Typing :: Typed
|
|
22
|
-
Requires-Python: >=3.
|
|
22
|
+
Requires-Python: >=3.12
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
License-File: LICENSE.md
|
|
25
25
|
Provides-Extra: dev
|
|
@@ -27,7 +27,6 @@ Requires-Dist: aedev_project_tpls; extra == "dev"
|
|
|
27
27
|
Requires-Dist: ae_ae; extra == "dev"
|
|
28
28
|
Requires-Dist: anybadge; extra == "dev"
|
|
29
29
|
Requires-Dist: coverage-badge; extra == "dev"
|
|
30
|
-
Requires-Dist: aedev_project_manager; extra == "dev"
|
|
31
30
|
Requires-Dist: flake8; extra == "dev"
|
|
32
31
|
Requires-Dist: mypy; extra == "dev"
|
|
33
32
|
Requires-Dist: pylint; extra == "dev"
|
|
@@ -40,7 +39,6 @@ Provides-Extra: docs
|
|
|
40
39
|
Provides-Extra: tests
|
|
41
40
|
Requires-Dist: anybadge; extra == "tests"
|
|
42
41
|
Requires-Dist: coverage-badge; extra == "tests"
|
|
43
|
-
Requires-Dist: aedev_project_manager; extra == "tests"
|
|
44
42
|
Requires-Dist: flake8; extra == "tests"
|
|
45
43
|
Requires-Dist: mypy; extra == "tests"
|
|
46
44
|
Requires-Dist: pylint; extra == "tests"
|
|
@@ -65,13 +63,13 @@ Dynamic: summary
|
|
|
65
63
|
|
|
66
64
|
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.101 -->
|
|
67
65
|
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.22 -->
|
|
68
|
-
# base 0.3.
|
|
66
|
+
# base 0.3.76
|
|
69
67
|
|
|
70
68
|
[](
|
|
71
69
|
https://gitlab.com/ae-group/ae_base)
|
|
72
70
|
[](
|
|
72
|
+
https://gitlab.com/ae-group/ae_base/-/tree/release0.3.76)
|
|
75
73
|
[](
|
|
76
74
|
https://pypi.org/project/ae-base/#history)
|
|
77
75
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
ae/base.py,sha256=3q6VBX7cjYpKIdbT4DclmlgxLN2fyz2ai5cA-Esrp8U,85246
|
|
2
|
+
ae_base-0.3.76.dist-info/licenses/LICENSE.md,sha256=VaplBlYVnxT91Aoxw8gjfH9VrN6KGmBtNIk_lRsYDVY,35003
|
|
3
|
+
ae_base-0.3.76.dist-info/METADATA,sha256=kaIZVAv8-14JU1EbAIIsHNP5GV-gTs0uE5UH7VqWayA,5363
|
|
4
|
+
ae_base-0.3.76.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
5
|
+
ae_base-0.3.76.dist-info/top_level.txt,sha256=vUdgAslSmhZLXWU48fm8AG2BjVnkOWLco8rzuW-5zY0,3
|
|
6
|
+
ae_base-0.3.76.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
7
|
+
ae_base-0.3.76.dist-info/RECORD,,
|
ae_base-0.3.74.dist-info/RECORD
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
ae/base.py,sha256=xedSZApcre3XFgLqLnXrIIk3EDpiwUEIZiHXxiNuxxI,84052
|
|
2
|
-
ae_base-0.3.74.dist-info/licenses/LICENSE.md,sha256=sDme_g0E8Ig6bx9p0_TaUyH4Ob74EmaIbCCc7_r8wQI,35003
|
|
3
|
-
ae_base-0.3.74.dist-info/METADATA,sha256=VIZfOmfXGVqaeaKS9iVqqww9VQj9dQ8vIBI4o9ZmdY0,5470
|
|
4
|
-
ae_base-0.3.74.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
5
|
-
ae_base-0.3.74.dist-info/top_level.txt,sha256=vUdgAslSmhZLXWU48fm8AG2BjVnkOWLco8rzuW-5zY0,3
|
|
6
|
-
ae_base-0.3.74.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
7
|
-
ae_base-0.3.74.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|