omdev 0.0.0.dev118__py3-none-any.whl → 0.0.0.dev120__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/cli.py CHANGED
@@ -16,7 +16,7 @@ from omlish.diag.pycharm import get_pycharm_version
16
16
 
17
17
 
18
18
  _DARWIN_OPEN_SCRIPT = """
19
- tell application "PyCharm"
19
+ tell application "{app}"
20
20
  activate
21
21
  open "{dir}"
22
22
  end tell
@@ -29,6 +29,7 @@ _LINUX_OPEN_SCRIPT = """
29
29
 
30
30
  # wmctrl -lx
31
31
  # 0x03000054 0 jetbrains-pycharm.jetbrains-pycharm spinlock-ws omlish - cli.py
32
+ # 0x0480004c 0 jetbrains-clion.jetbrains-clion spinlock-ws cpython - ceval.c
32
33
  # wmctrl -i -a 0x03000054
33
34
 
34
35
  if pgrep -x "pycharm.sh" > /dev/null; then
@@ -68,6 +69,7 @@ class Cli(ap.Cli):
68
69
 
69
70
  @ap.command(
70
71
  ap.arg('dir', nargs='?'),
72
+ ap.arg('--clion', action='store_true'),
71
73
  )
72
74
  def open(self) -> None:
73
75
  dir = os.path.abspath(self.args.dir or '.') # noqa
@@ -76,7 +78,10 @@ class Cli(ap.Cli):
76
78
  if '"' in dir:
77
79
  raise ValueError(dir)
78
80
 
79
- scpt_src = _DARWIN_OPEN_SCRIPT.format(dir=dir)
81
+ scpt_src = _DARWIN_OPEN_SCRIPT.format(
82
+ app='CLion' if self.args.clion else 'PyCharm',
83
+ dir=dir,
84
+ )
80
85
 
81
86
  scpt_file = tempfile.mktemp(__package__ + '-pycharm-open') # noqa
82
87
  with open(scpt_file, 'w') as f:
omdev/pyproject/cli.py CHANGED
@@ -155,7 +155,7 @@ class Venv:
155
155
  *(['uv'] if uv else []),
156
156
  )
157
157
 
158
- if (sr := self._cfg.requires):
158
+ if sr := self._cfg.requires:
159
159
  rr = RequirementsRewriter(self._name)
160
160
  reqs = [rr.rewrite(req) for req in sr]
161
161
 
omdev/scripts/interp.py CHANGED
@@ -1302,7 +1302,7 @@ class StandardLogFormatter(logging.Formatter):
1302
1302
  if datefmt:
1303
1303
  return ct.strftime(datefmt) # noqa
1304
1304
  else:
1305
- t = ct.strftime("%Y-%m-%d %H:%M:%S") # noqa
1305
+ t = ct.strftime('%Y-%m-%d %H:%M:%S')
1306
1306
  return '%s.%03d' % (t, record.msecs)
1307
1307
 
1308
1308
 
@@ -1439,6 +1439,7 @@ def configure_standard_logging(
1439
1439
  json: bool = False,
1440
1440
  target: ta.Optional[logging.Logger] = None,
1441
1441
  force: bool = False,
1442
+ handler_factory: ta.Optional[ta.Callable[[], logging.Handler]] = None,
1442
1443
  ) -> ta.Optional[StandardLogHandler]:
1443
1444
  with _locking_logging_module_lock():
1444
1445
  if target is None:
@@ -1452,7 +1453,10 @@ def configure_standard_logging(
1452
1453
 
1453
1454
  #
1454
1455
 
1455
- handler = logging.StreamHandler()
1456
+ if handler_factory is not None:
1457
+ handler = handler_factory()
1458
+ else:
1459
+ handler = logging.StreamHandler()
1456
1460
 
1457
1461
  #
1458
1462
 
@@ -2825,7 +2825,7 @@ class StandardLogFormatter(logging.Formatter):
2825
2825
  if datefmt:
2826
2826
  return ct.strftime(datefmt) # noqa
2827
2827
  else:
2828
- t = ct.strftime("%Y-%m-%d %H:%M:%S") # noqa
2828
+ t = ct.strftime('%Y-%m-%d %H:%M:%S')
2829
2829
  return '%s.%03d' % (t, record.msecs)
2830
2830
 
2831
2831
 
@@ -2962,6 +2962,7 @@ def configure_standard_logging(
2962
2962
  json: bool = False,
2963
2963
  target: ta.Optional[logging.Logger] = None,
2964
2964
  force: bool = False,
2965
+ handler_factory: ta.Optional[ta.Callable[[], logging.Handler]] = None,
2965
2966
  ) -> ta.Optional[StandardLogHandler]:
2966
2967
  with _locking_logging_module_lock():
2967
2968
  if target is None:
@@ -2975,7 +2976,10 @@ def configure_standard_logging(
2975
2976
 
2976
2977
  #
2977
2978
 
2978
- handler = logging.StreamHandler()
2979
+ if handler_factory is not None:
2980
+ handler = handler_factory()
2981
+ else:
2982
+ handler = logging.StreamHandler()
2979
2983
 
2980
2984
  #
2981
2985
 
@@ -5750,7 +5754,7 @@ class Venv:
5750
5754
  *(['uv'] if uv else []),
5751
5755
  )
5752
5756
 
5753
- if (sr := self._cfg.requires):
5757
+ if sr := self._cfg.requires:
5754
5758
  rr = RequirementsRewriter(self._name)
5755
5759
  reqs = [rr.rewrite(req) for req in sr]
5756
5760
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: omdev
3
- Version: 0.0.0.dev118
3
+ Version: 0.0.0.dev120
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.dev118
15
+ Requires-Dist: omlish ==0.0.0.dev120
16
16
  Provides-Extra: all
17
17
  Requires-Dist: black ~=24.10 ; extra == 'all'
18
18
  Requires-Dist: pycparser ~=2.22 ; extra == 'all'
@@ -109,11 +109,11 @@ omdev/ptk/apps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
109
109
  omdev/ptk/apps/ncdu.py,sha256=dOkEJoc2Wjv1u_Uge7Vpei_LvXldoPP5833Eia355tc,4548
110
110
  omdev/pycharm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
111
111
  omdev/pycharm/__main__.py,sha256=hUPp11D024eMdT86BxXiRVtF7AGBk5W6Zn8_mEHSksY,163
112
- omdev/pycharm/cli.py,sha256=gfAgBL3REb3hmtRRRck18mCDGwQQ4kDLhYuP1CP66rY,2478
112
+ omdev/pycharm/cli.py,sha256=13q3ShvRlm6PDnLEzAuNJCafw5xLQOWd2lH2hy31wdA,2697
113
113
  omdev/pyproject/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
114
114
  omdev/pyproject/__main__.py,sha256=gn3Rl1aYPYdiTtEqa9ifi0t-e4ZwPY0vhJ4UXvYdJDY,165
115
115
  omdev/pyproject/cexts.py,sha256=x13piOOnNrYbA17qZLDVuR0p1sqhgEwpk4FtImX-klM,4281
116
- omdev/pyproject/cli.py,sha256=U2pOOqXvqw8RbdcgKryv-MUeHT6QqSwL-dhnDjgyz0U,11340
116
+ omdev/pyproject/cli.py,sha256=V3vxC_VSTuad3kUtLKOi0wGcJlSJPhrxBaXEcb2kE9g,11338
117
117
  omdev/pyproject/configs.py,sha256=K9H5cGwVLgHi8wKwtYvlXHZ9ThtmnI4jo8JAb-t1-70,2859
118
118
  omdev/pyproject/pkg.py,sha256=WB9k3zEpHSAR24H09kikgAnLMWUz-bk9f0aB-2L_ITw,14560
119
119
  omdev/pyproject/reqs.py,sha256=8feZ71YnGzwKbLK4zO28CDQeNcZIIuq6cnkBhs6M-7E,2406
@@ -122,8 +122,8 @@ omdev/scripts/bumpversion.py,sha256=Kn7fo73Hs8uJh3Hi3EIyLOlzLPWAC6dwuD_lZ3cIzuY,
122
122
  omdev/scripts/execrss.py,sha256=mR0G0wERBYtQmVIn63lCIIFb5zkCM6X_XOENDFYDBKc,651
123
123
  omdev/scripts/exectime.py,sha256=sFb376GflU6s9gNX-2-we8hgH6w5MuQNS9g6i4SqJIo,610
124
124
  omdev/scripts/importtrace.py,sha256=Jbo3Yk2RAbE8_tJ97iTcVNpoxCJxrRb2tl1W_CV3NG0,14067
125
- omdev/scripts/interp.py,sha256=U6mU2RPZjwcBhn4Vl4SrAyDUFcf7bBxBnPY5FHCxosw,72496
126
- omdev/scripts/pyproject.py,sha256=a1qGCJCkvvZX-cwlqVOsf2kBaBRqQIEb9fQN-zEhH_Y,173571
125
+ omdev/scripts/interp.py,sha256=GM6VrG1Wd1vfwbAJr7fartN7hER_mnJknyX65o3jhkk,72665
126
+ omdev/scripts/pyproject.py,sha256=x7gsWZ8h1gZ3Y_31-cKpOeT_uafAHPxFGdwxjh7Ha-I,173738
127
127
  omdev/scripts/slowcat.py,sha256=lssv4yrgJHiWfOiHkUut2p8E8Tq32zB-ujXESQxFFHY,2728
128
128
  omdev/scripts/tmpexec.py,sha256=WTYcf56Tj2qjYV14AWmV8SfT0u6Y8eIU6cKgQRvEK3c,1442
129
129
  omdev/toml/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
@@ -143,9 +143,9 @@ omdev/tools/sqlrepl.py,sha256=tmFZh80-xsGM62dyQ7_UGLebChrj7IHbIPYBWDJMgVk,5741
143
143
  omdev/tools/pawk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
144
144
  omdev/tools/pawk/__main__.py,sha256=VCqeRVnqT1RPEoIrqHFSu4PXVMg4YEgF4qCQm90-eRI,66
145
145
  omdev/tools/pawk/pawk.py,sha256=Eckymn22GfychCQcQi96BFqRo_LmiJ-EPhC8TTUJdB4,11446
146
- omdev-0.0.0.dev118.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
147
- omdev-0.0.0.dev118.dist-info/METADATA,sha256=H12RA_-fvdbRBsDbFu-mOIkcG441cIkr1xCCh8S_4Es,1810
148
- omdev-0.0.0.dev118.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
149
- omdev-0.0.0.dev118.dist-info/entry_points.txt,sha256=dHLXFmq5D9B8qUyhRtFqTGWGxlbx3t5ejedjrnXNYLU,33
150
- omdev-0.0.0.dev118.dist-info/top_level.txt,sha256=1nr7j30fEWgLYHW3lGR9pkdHkb7knv1U1ES1XRNVQ6k,6
151
- omdev-0.0.0.dev118.dist-info/RECORD,,
146
+ omdev-0.0.0.dev120.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
147
+ omdev-0.0.0.dev120.dist-info/METADATA,sha256=_EKIVacZqRgQDdQ5_usv_9GmkNdjXOGCSyGB5FssZyY,1810
148
+ omdev-0.0.0.dev120.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
149
+ omdev-0.0.0.dev120.dist-info/entry_points.txt,sha256=dHLXFmq5D9B8qUyhRtFqTGWGxlbx3t5ejedjrnXNYLU,33
150
+ omdev-0.0.0.dev120.dist-info/top_level.txt,sha256=1nr7j30fEWgLYHW3lGR9pkdHkb7knv1U1ES1XRNVQ6k,6
151
+ omdev-0.0.0.dev120.dist-info/RECORD,,