kkpyutil 1.46.0__py3-none-any.whl → 1.46.2__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.
- {kkpyutil-1.46.0.dist-info → kkpyutil-1.46.2.dist-info}/METADATA +1 -1
- kkpyutil-1.46.2.dist-info/RECORD +7 -0
- kkpyutil.py +9 -10
- kkpyutil-1.46.0.dist-info/RECORD +0 -7
- {kkpyutil-1.46.0.dist-info → kkpyutil-1.46.2.dist-info}/LICENSE +0 -0
- {kkpyutil-1.46.0.dist-info → kkpyutil-1.46.2.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
kkpyutil.py,sha256=4lH441A7dw-nJU_lUcc7Go8CkRMWj9qhJ4BVb5vH__k,117729
|
|
2
|
+
kkpyutil_helper/windows/kkttssave.ps1,sha256=xa3-WzqNh2rGYlOx_I4ewOuCE94gkTO5cEwYH0M67_0,446
|
|
3
|
+
kkpyutil_helper/windows/kkttsspeak.ps1,sha256=7WUUHMmjTQroUWA2Mvdt4JtSt475nZUHQx-qP-7rS6o,305
|
|
4
|
+
kkpyutil-1.46.2.dist-info/LICENSE,sha256=uISevGnCxB5QOU0ftbofN75_yUtd6E2h_MWE1zqagC8,1065
|
|
5
|
+
kkpyutil-1.46.2.dist-info/METADATA,sha256=AeBu4F5_W8uG5Jrw4wQv5dZPgrrL7WMZprOFmAHWB5o,1136
|
|
6
|
+
kkpyutil-1.46.2.dist-info/WHEEL,sha256=kLuE8m1WYU0Ig0_YEGrXyTtiJvKPpLpDEiChiNyei5Y,88
|
|
7
|
+
kkpyutil-1.46.2.dist-info/RECORD,,
|
kkpyutil.py
CHANGED
|
@@ -581,7 +581,7 @@ glogger.setLevel(logging.DEBUG)
|
|
|
581
581
|
def catch_unknown_exception(exc_type, exc_value, exc_traceback):
|
|
582
582
|
"""Global exception to handle uncaught exceptions"""
|
|
583
583
|
exc_info = exc_type, exc_value, exc_traceback
|
|
584
|
-
glogger.error('Unhandled exception:
|
|
584
|
+
glogger.error('Unhandled exception:', exc_info=exc_info)
|
|
585
585
|
# _logger.exception('Unhandled exception: ') # try-except block only.
|
|
586
586
|
# sys.__excepthook__(*exc_info) # Keep commented out to avoid msg dup.
|
|
587
587
|
|
|
@@ -1260,8 +1260,7 @@ def _log_subprocess_command(cmd, cwd, logger, func_name="subprocess"):
|
|
|
1260
1260
|
cmd_log = f"""\
|
|
1261
1261
|
{func_name}:
|
|
1262
1262
|
{' '.join(cmd)}
|
|
1263
|
-
cwd: {osp.abspath(cwd) if cwd else os.getcwd()}
|
|
1264
|
-
"""
|
|
1263
|
+
cwd: {osp.abspath(cwd) if cwd else os.getcwd()}"""
|
|
1265
1264
|
logger.info(cmd_log)
|
|
1266
1265
|
|
|
1267
1266
|
|
|
@@ -1344,9 +1343,9 @@ def run_cmd(cmd, cwd=None, logger=None, check=True, shell=False, verbose=False,
|
|
|
1344
1343
|
stdout_log = safe_decode_bytes(proc.stdout)
|
|
1345
1344
|
stderr_log = safe_decode_bytes(proc.stderr)
|
|
1346
1345
|
if stdout_log:
|
|
1347
|
-
console_info(f'stdout:\n{stdout_log}')
|
|
1346
|
+
console_info(f'stdout:\n{stdout_log.rstrip()}')
|
|
1348
1347
|
if stderr_log:
|
|
1349
|
-
logger.error(f'stderr:\n{stderr_log}')
|
|
1348
|
+
logger.error(f'stderr:\n{stderr_log.rstrip()}')
|
|
1350
1349
|
# subprocess started but failed halfway: check=True, proc returns non-zero
|
|
1351
1350
|
except subprocess.CalledProcessError as e:
|
|
1352
1351
|
stdout_log = safe_decode_bytes(e.stdout)
|
|
@@ -1354,9 +1353,9 @@ def run_cmd(cmd, cwd=None, logger=None, check=True, shell=False, verbose=False,
|
|
|
1354
1353
|
|
|
1355
1354
|
# Log subprocess output with clear separation
|
|
1356
1355
|
if stdout_log:
|
|
1357
|
-
logger.info(f'
|
|
1356
|
+
logger.info(f'stdout:\n{stdout_log.rstrip()}')
|
|
1358
1357
|
if stderr_log:
|
|
1359
|
-
logger.error(f'
|
|
1358
|
+
logger.error(f'stderr:\n{stderr_log.rstrip()}')
|
|
1360
1359
|
|
|
1361
1360
|
# Log structured error message
|
|
1362
1361
|
situation = "Subprocess completed with non-zero exit code"
|
|
@@ -1796,13 +1795,13 @@ def convert_compound_cases(text, style='pascal', instyle='auto'):
|
|
|
1796
1795
|
|
|
1797
1796
|
def _detect_casing(txt):
|
|
1798
1797
|
case_patterns = {
|
|
1799
|
-
'snake': r'^[a-
|
|
1800
|
-
'SNAKE': r'^[A-Z]
|
|
1798
|
+
'snake': r'^[a-zA-Z][a-zA-Z0-9\(\)]*(_[a-zA-Z0-9\(\)]+)+$', # Must have at least one underscore
|
|
1799
|
+
'SNAKE': r'^[A-Z][A-Z0-9\(\)]*(_[A-Z0-9\(\)]+)*$',
|
|
1801
1800
|
'camel': r'^[a-z]+([A-Z][a-z0-9]*)*$',
|
|
1802
1801
|
'kebab': r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)+$',
|
|
1803
1802
|
'pascal': r'^[A-Z][a-z0-9]+([A-Z][a-z0-9]*)*$',
|
|
1804
1803
|
'phrase': r'^[a-z]+( [a-z]+)*$',
|
|
1805
|
-
'title': r'^[A-Z][a-z]*(
|
|
1804
|
+
'title': r'^[A-Z][a-z]*( [A-Z\(][a-z\)]*)*$',
|
|
1806
1805
|
}
|
|
1807
1806
|
for case_style, pattern in case_patterns.items():
|
|
1808
1807
|
if re.match(pattern, txt):
|
kkpyutil-1.46.0.dist-info/RECORD
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
kkpyutil.py,sha256=ieg4r7L6HgyHNP_nWY6pELt-h2COGDkpkoLAZz7hyAE,117642
|
|
2
|
-
kkpyutil_helper/windows/kkttssave.ps1,sha256=xa3-WzqNh2rGYlOx_I4ewOuCE94gkTO5cEwYH0M67_0,446
|
|
3
|
-
kkpyutil_helper/windows/kkttsspeak.ps1,sha256=7WUUHMmjTQroUWA2Mvdt4JtSt475nZUHQx-qP-7rS6o,305
|
|
4
|
-
kkpyutil-1.46.0.dist-info/LICENSE,sha256=uISevGnCxB5QOU0ftbofN75_yUtd6E2h_MWE1zqagC8,1065
|
|
5
|
-
kkpyutil-1.46.0.dist-info/METADATA,sha256=8_cqRG0nREsGK6-CAjAQtH27IpEVnPzYRursCAoNMKs,1136
|
|
6
|
-
kkpyutil-1.46.0.dist-info/WHEEL,sha256=kLuE8m1WYU0Ig0_YEGrXyTtiJvKPpLpDEiChiNyei5Y,88
|
|
7
|
-
kkpyutil-1.46.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|