Skip to content

Commit 26f29f0

Browse files
committed
feat(__init__): expose all public mixin functions
Add all missing public functions from mixins to __init__.py exports: - CI: if_ci - Modules: detect_packages_from_files, find_all_packages_under_path - Paths: strip_common_prefix - Runtime: find_shiv, ensure_standalone_script_up_to_date, ensure_zipapp_up_to_date, runtime_swap - Subprocess: run_with_output, run_with_separated_output - Testing: create_mock_superclass_test, patch_everywhere All functions are now accessible via the namespace class and included in __all__.
1 parent 2710597 commit 26f29f0

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

src/apathetic_utils/__init__.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141

4242
# CI
4343
CI_ENV_VARS = apathetic_utils.CI_ENV_VARS
44+
if_ci = apathetic_utils.if_ci
4445
is_ci = apathetic_utils.is_ci
4546

4647
# Files
@@ -51,10 +52,15 @@
5152
fnmatchcase_portable = apathetic_utils.fnmatchcase_portable
5253
is_excluded_raw = apathetic_utils.is_excluded_raw
5354

55+
# Modules
56+
detect_packages_from_files = apathetic_utils.detect_packages_from_files
57+
find_all_packages_under_path = apathetic_utils.find_all_packages_under_path
58+
5459
# Paths
5560
get_glob_root = apathetic_utils.get_glob_root
5661
has_glob_chars = apathetic_utils.has_glob_chars
5762
normalize_path_string = apathetic_utils.normalize_path_string
63+
strip_common_prefix = apathetic_utils.strip_common_prefix
5864

5965
# System
6066
# CapturedOutput is a nested class in ApatheticUtils_Internal_Subprocess that
@@ -70,8 +76,20 @@
7076
capture_output = apathetic_utils.capture_output
7177
create_version_info = apathetic_utils.create_version_info
7278
detect_runtime_mode = apathetic_utils.detect_runtime_mode
79+
ensure_standalone_script_up_to_date = (
80+
apathetic_utils.ensure_standalone_script_up_to_date
81+
)
82+
ensure_zipapp_up_to_date = apathetic_utils.ensure_zipapp_up_to_date
83+
find_shiv = apathetic_utils.find_shiv
7384
get_sys_version_info = apathetic_utils.get_sys_version_info
7485
is_running_under_pytest = apathetic_utils.is_running_under_pytest
86+
run_with_output = apathetic_utils.run_with_output
87+
run_with_separated_output = apathetic_utils.run_with_separated_output
88+
runtime_swap = apathetic_utils.runtime_swap
89+
90+
# Testing
91+
create_mock_superclass_test = apathetic_utils.create_mock_superclass_test
92+
patch_everywhere = apathetic_utils.patch_everywhere
7593

7694
# Text
7795
plural = apathetic_utils.plural
@@ -88,24 +106,38 @@
88106
"apathetic_utils",
89107
# ci
90108
"CI_ENV_VARS",
109+
"if_ci",
91110
"is_ci",
92111
# files
93112
"load_jsonc",
94113
"load_toml",
95114
# matching
96115
"fnmatchcase_portable",
97116
"is_excluded_raw",
117+
# modules
118+
"detect_packages_from_files",
119+
"find_all_packages_under_path",
98120
# paths
99121
"get_glob_root",
100122
"has_glob_chars",
101123
"normalize_path_string",
124+
"strip_common_prefix",
102125
# system
103126
"CapturedOutput",
104127
"capture_output",
105128
"create_version_info",
106129
"detect_runtime_mode",
130+
"ensure_standalone_script_up_to_date",
131+
"ensure_zipapp_up_to_date",
132+
"find_shiv",
107133
"get_sys_version_info",
108134
"is_running_under_pytest",
135+
"run_with_output",
136+
"run_with_separated_output",
137+
"runtime_swap",
138+
# testing
139+
"create_mock_superclass_test",
140+
"patch_everywhere",
109141
# text
110142
"plural",
111143
"remove_path_in_error_message",

0 commit comments

Comments
 (0)