omdev 0.0.0.dev64__py3-none-any.whl → 0.0.0.dev66__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.
Potentially problematic release.
This version of omdev might be problematic. Click here for more details.
- omdev/pycharm/runhack.py +48 -5
- {omdev-0.0.0.dev64.dist-info → omdev-0.0.0.dev66.dist-info}/METADATA +2 -2
- {omdev-0.0.0.dev64.dist-info → omdev-0.0.0.dev66.dist-info}/RECORD +7 -7
- {omdev-0.0.0.dev64.dist-info → omdev-0.0.0.dev66.dist-info}/LICENSE +0 -0
- {omdev-0.0.0.dev64.dist-info → omdev-0.0.0.dev66.dist-info}/WHEEL +0 -0
- {omdev-0.0.0.dev64.dist-info → omdev-0.0.0.dev66.dist-info}/entry_points.txt +0 -0
- {omdev-0.0.0.dev64.dist-info → omdev-0.0.0.dev66.dist-info}/top_level.txt +0 -0
omdev/pycharm/runhack.py
CHANGED
|
@@ -1099,12 +1099,52 @@ class ExecDecider:
|
|
|
1099
1099
|
sys_path=self._filter_out_cwd(self._env.sys_path),
|
|
1100
1100
|
)
|
|
1101
1101
|
|
|
1102
|
+
def _decide_debugger_test_runner_target_not_in_root(self, tgt): # type: (Target) -> ExecDecision | None
|
|
1103
|
+
if not (isinstance(tgt, DebuggerTarget) and self._env.cwd != self._root_dir):
|
|
1104
|
+
return None
|
|
1105
|
+
|
|
1106
|
+
dt = tgt.target
|
|
1107
|
+
if not isinstance(dt, TestRunnerTarget):
|
|
1108
|
+
return None
|
|
1109
|
+
|
|
1110
|
+
def fix_test(t):
|
|
1111
|
+
if isinstance(t, PathTest):
|
|
1112
|
+
return PathTest(os.path.abspath(t.s))
|
|
1113
|
+
|
|
1114
|
+
elif isinstance(t, TargetTest):
|
|
1115
|
+
if ':' in t.s:
|
|
1116
|
+
l, _, r = t.s.partition(':')
|
|
1117
|
+
return TargetTest(':'.join([os.path.abspath(l), r]))
|
|
1118
|
+
else:
|
|
1119
|
+
return TargetTest(os.path.abspath(t.s))
|
|
1120
|
+
|
|
1121
|
+
else:
|
|
1122
|
+
raise TypeError(t)
|
|
1123
|
+
|
|
1124
|
+
new_tests = [fix_test(t) for t in dt.tests]
|
|
1125
|
+
|
|
1126
|
+
new_dt = TestRunnerTarget(**{ # type: ignore
|
|
1127
|
+
**dt.as_dict(),
|
|
1128
|
+
'tests': new_tests,
|
|
1129
|
+
})
|
|
1130
|
+
|
|
1131
|
+
return ExecDecision(
|
|
1132
|
+
DebuggerTarget(**{ # type: ignore
|
|
1133
|
+
**tgt.as_dict(),
|
|
1134
|
+
'target': new_dt,
|
|
1135
|
+
}),
|
|
1136
|
+
cwd=self._root_dir,
|
|
1137
|
+
python_path=self._filter_out_cwd(self._env.python_path),
|
|
1138
|
+
sys_path=self._filter_out_cwd(self._env.sys_path),
|
|
1139
|
+
)
|
|
1140
|
+
|
|
1102
1141
|
def decide(self, tgt): # type: (Target) -> ExecDecision | None
|
|
1103
1142
|
for fn in [
|
|
1104
1143
|
self._decide_file_target,
|
|
1105
1144
|
self._decide_module_target_not_in_root,
|
|
1106
1145
|
self._decide_debugger_file_target,
|
|
1107
1146
|
self._decide_debugger_module_target_not_in_root,
|
|
1147
|
+
self._decide_debugger_test_runner_target_not_in_root,
|
|
1108
1148
|
]:
|
|
1109
1149
|
if (ne := fn(tgt)) is not None:
|
|
1110
1150
|
self._debug(f'{fn.__name__=}')
|
|
@@ -1135,9 +1175,12 @@ class HackRunner:
|
|
|
1135
1175
|
if isinstance(arg, str):
|
|
1136
1176
|
s = arg
|
|
1137
1177
|
else:
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1178
|
+
try:
|
|
1179
|
+
import pprint
|
|
1180
|
+
except ImportError:
|
|
1181
|
+
s = repr(arg)
|
|
1182
|
+
else:
|
|
1183
|
+
s = pprint.pformat(arg, sort_dicts=False)
|
|
1141
1184
|
|
|
1142
1185
|
print(s, file=sys.stderr)
|
|
1143
1186
|
|
|
@@ -1243,8 +1286,8 @@ _HAS_RUN = False
|
|
|
1243
1286
|
_BOOL_ENV_VAR_VALUES = {
|
|
1244
1287
|
s: b
|
|
1245
1288
|
for b, ss in [
|
|
1246
|
-
(True, ['1', 'true']),
|
|
1247
|
-
(False, ['0', 'false']),
|
|
1289
|
+
(True, ['1', 'true', 't']),
|
|
1290
|
+
(False, ['0', 'false', 'f']),
|
|
1248
1291
|
]
|
|
1249
1292
|
for s in ss
|
|
1250
1293
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: omdev
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev66
|
|
4
4
|
Summary: omdev
|
|
5
5
|
Author: wrmsr
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -12,7 +12,7 @@ Classifier: Operating System :: OS Independent
|
|
|
12
12
|
Classifier: Operating System :: POSIX
|
|
13
13
|
Requires-Python: ~=3.12
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: omlish ==0.0.0.
|
|
15
|
+
Requires-Dist: omlish ==0.0.0.dev66
|
|
16
16
|
Provides-Extra: all
|
|
17
17
|
Requires-Dist: pycparser ~=2.22 ; extra == 'all'
|
|
18
18
|
Requires-Dist: cffi ~=1.17 ; extra == 'all'
|
|
@@ -94,7 +94,7 @@ omdev/precheck/lite.py,sha256=MLeDZP2UexNZzYTcSx4-LrhA97kCKn8tXrGkhsJb6I0,3649
|
|
|
94
94
|
omdev/precheck/precheck.py,sha256=Boe3zbK0RXCGzw9H_OsyqJ4yMETuyrwy8P4UFAZQcTY,2477
|
|
95
95
|
omdev/precheck/scripts.py,sha256=qq6MXkxgrYngPg5pWnXH4uRSuRkP3mFqbeml1UmvGBc,1265
|
|
96
96
|
omdev/pycharm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
97
|
-
omdev/pycharm/runhack.py,sha256=
|
|
97
|
+
omdev/pycharm/runhack.py,sha256=boK9a8SMvT9kPnJNtZJ5p1iA6OUlf3CV9buHLb8Zv7Q,33242
|
|
98
98
|
omdev/pyproject/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
|
|
99
99
|
omdev/pyproject/__main__.py,sha256=gn3Rl1aYPYdiTtEqa9ifi0t-e4ZwPY0vhJ4UXvYdJDY,165
|
|
100
100
|
omdev/pyproject/cexts.py,sha256=x13piOOnNrYbA17qZLDVuR0p1sqhgEwpk4FtImX-klM,4281
|
|
@@ -122,9 +122,9 @@ omdev/tools/piptools.py,sha256=-jR5q3w4sHqntxCLExFCBNIARB788FUsAbJ62PK2sBU,2774
|
|
|
122
122
|
omdev/tools/proftools.py,sha256=xKSm_yPoCnfsvS3iT9MblDqFMuZmGfI3_koGj8amMyU,145
|
|
123
123
|
omdev/tools/rst.py,sha256=6dWk8QZHoGiLSuBw3TKsXZjjFK6wWBEtPi9krdCLKKg,977
|
|
124
124
|
omdev/tools/sqlrepl.py,sha256=tmFZh80-xsGM62dyQ7_UGLebChrj7IHbIPYBWDJMgVk,5741
|
|
125
|
-
omdev-0.0.0.
|
|
126
|
-
omdev-0.0.0.
|
|
127
|
-
omdev-0.0.0.
|
|
128
|
-
omdev-0.0.0.
|
|
129
|
-
omdev-0.0.0.
|
|
130
|
-
omdev-0.0.0.
|
|
125
|
+
omdev-0.0.0.dev66.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
|
126
|
+
omdev-0.0.0.dev66.dist-info/METADATA,sha256=ccZeKMsEzkV49SBk06qnqoTHgOX5__5FdBsWmZC1X-k,1252
|
|
127
|
+
omdev-0.0.0.dev66.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
128
|
+
omdev-0.0.0.dev66.dist-info/entry_points.txt,sha256=dHLXFmq5D9B8qUyhRtFqTGWGxlbx3t5ejedjrnXNYLU,33
|
|
129
|
+
omdev-0.0.0.dev66.dist-info/top_level.txt,sha256=1nr7j30fEWgLYHW3lGR9pkdHkb7knv1U1ES1XRNVQ6k,6
|
|
130
|
+
omdev-0.0.0.dev66.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|