omdev 0.0.0.dev140__tar.gz → 0.0.0.dev142__tar.gz

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.

Files changed (166) hide show
  1. {omdev-0.0.0.dev140/omdev.egg-info → omdev-0.0.0.dev142}/PKG-INFO +2 -2
  2. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/.manifests.json +27 -15
  3. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/scripts/interp.py +13 -0
  4. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/scripts/pyproject.py +123 -86
  5. omdev-0.0.0.dev142/omdev/tools/cloc.py +149 -0
  6. {omdev-0.0.0.dev140/omdev → omdev-0.0.0.dev142/omdev/tools}/json/__main__.py +1 -1
  7. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142/omdev.egg-info}/PKG-INFO +2 -2
  8. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev.egg-info/SOURCES.txt +9 -8
  9. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev.egg-info/requires.txt +1 -1
  10. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/pyproject.toml +2 -2
  11. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/LICENSE +0 -0
  12. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/MANIFEST.in +0 -0
  13. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/README.rst +0 -0
  14. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/__about__.py +0 -0
  15. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/__init__.py +0 -0
  16. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/amalg/__init__.py +0 -0
  17. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/amalg/__main__.py +0 -0
  18. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/amalg/amalg.py +0 -0
  19. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/antlr/__init__.py +0 -0
  20. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/antlr/consts.py +0 -0
  21. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/antlr/gen.py +0 -0
  22. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/bracepy.py +0 -0
  23. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cache/__init__.py +0 -0
  24. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cache/compute/__init__.py +0 -0
  25. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cache/compute/cache.py +0 -0
  26. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cache/compute/contexts.py +0 -0
  27. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cache/compute/currents.py +0 -0
  28. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cache/compute/fns.py +0 -0
  29. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cache/compute/resolvers.py +0 -0
  30. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cache/compute/storage.py +0 -0
  31. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cache/compute/types.py +0 -0
  32. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cache/data/__init__.py +0 -0
  33. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cache/data/actions.py +0 -0
  34. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cache/data/cache.py +0 -0
  35. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cache/data/consts.py +0 -0
  36. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cache/data/defaults.py +0 -0
  37. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cache/data/manifests.py +0 -0
  38. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cache/data/specs.py +0 -0
  39. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cexts/__init__.py +0 -0
  40. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cexts/_boilerplate.cc +0 -0
  41. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cexts/_distutils/LICENSE +0 -0
  42. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cexts/_distutils/__init__.py +0 -0
  43. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cexts/_distutils/build_ext.py +0 -0
  44. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cexts/_distutils/compilers/__init__.py +0 -0
  45. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cexts/_distutils/compilers/ccompiler.py +0 -0
  46. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cexts/_distutils/compilers/options.py +0 -0
  47. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cexts/_distutils/compilers/unixccompiler.py +0 -0
  48. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cexts/_distutils/dir_util.py +0 -0
  49. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cexts/_distutils/errors.py +0 -0
  50. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cexts/_distutils/extension.py +0 -0
  51. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cexts/_distutils/file_util.py +0 -0
  52. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cexts/_distutils/modified.py +0 -0
  53. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cexts/_distutils/spawn.py +0 -0
  54. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cexts/_distutils/sysconfig.py +0 -0
  55. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cexts/_distutils/util.py +0 -0
  56. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cexts/_distutils/version.py +0 -0
  57. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cexts/build.py +0 -0
  58. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cexts/cmake.py +0 -0
  59. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cexts/importhook.py +0 -0
  60. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cexts/magic.py +0 -0
  61. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cexts/scan.py +0 -0
  62. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/classdot.py +0 -0
  63. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cli/__init__.py +0 -0
  64. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cli/__main__.py +0 -0
  65. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cli/_pathhack.py +0 -0
  66. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cli/clicli.py +0 -0
  67. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cli/install.py +0 -0
  68. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cli/main.py +0 -0
  69. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cli/managers.py +0 -0
  70. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cli/types.py +0 -0
  71. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/clipboard/__init__.py +0 -0
  72. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/clipboard/clipboard.py +0 -0
  73. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/clipboard/darwin_cf.py +0 -0
  74. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/clipboard/linux_x11.py +0 -0
  75. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/cmake.py +0 -0
  76. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/findimports.py +0 -0
  77. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/git.py +0 -0
  78. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/imgur.py +0 -0
  79. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/interp/__init__.py +0 -0
  80. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/interp/__main__.py +0 -0
  81. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/interp/cli.py +0 -0
  82. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/interp/inspect.py +0 -0
  83. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/interp/providers.py +0 -0
  84. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/interp/pyenv.py +0 -0
  85. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/interp/resolvers.py +0 -0
  86. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/interp/standalone.py +0 -0
  87. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/interp/system.py +0 -0
  88. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/interp/types.py +0 -0
  89. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/magic/__init__.py +0 -0
  90. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/magic/find.py +0 -0
  91. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/magic/magic.py +0 -0
  92. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/magic/prepare.py +0 -0
  93. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/magic/styles.py +0 -0
  94. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/manifests/__init__.py +0 -0
  95. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/manifests/build.py +0 -0
  96. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/manifests/load.py +0 -0
  97. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/manifests/types.py +0 -0
  98. {omdev-0.0.0.dev140/omdev/json → omdev-0.0.0.dev142/omdev/mypy}/__init__.py +0 -0
  99. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/mypy/debug.py +0 -0
  100. {omdev-0.0.0.dev140/omdev/mypy → omdev-0.0.0.dev142/omdev/packaging}/__init__.py +0 -0
  101. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/packaging/marshal.py +0 -0
  102. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/packaging/names.py +0 -0
  103. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/packaging/requires.py +0 -0
  104. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/packaging/specifiers.py +0 -0
  105. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/packaging/versions.py +0 -0
  106. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/pip.py +0 -0
  107. {omdev-0.0.0.dev140/omdev/packaging → omdev-0.0.0.dev142/omdev/precheck}/__init__.py +0 -0
  108. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/precheck/__main__.py +0 -0
  109. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/precheck/base.py +0 -0
  110. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/precheck/git.py +0 -0
  111. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/precheck/lite.py +0 -0
  112. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/precheck/main.py +0 -0
  113. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/precheck/manifests.py +0 -0
  114. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/precheck/scripts.py +0 -0
  115. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/ptk/__init__.py +0 -0
  116. {omdev-0.0.0.dev140/omdev/precheck → omdev-0.0.0.dev142/omdev/ptk/apps}/__init__.py +0 -0
  117. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/ptk/apps/ncdu.py +0 -0
  118. {omdev-0.0.0.dev140/omdev/ptk/apps → omdev-0.0.0.dev142/omdev/pycharm}/__init__.py +0 -0
  119. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/pycharm/__main__.py +0 -0
  120. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/pycharm/cli.py +0 -0
  121. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/pyproject/__init__.py +0 -0
  122. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/pyproject/__main__.py +0 -0
  123. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/pyproject/cexts.py +0 -0
  124. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/pyproject/cli.py +0 -0
  125. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/pyproject/configs.py +0 -0
  126. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/pyproject/pkg.py +0 -0
  127. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/pyproject/reqs.py +0 -0
  128. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/revisions.py +0 -0
  129. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/scripts/__init__.py +0 -0
  130. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/scripts/bumpversion.py +0 -0
  131. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/scripts/execrss.py +0 -0
  132. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/scripts/exectime.py +0 -0
  133. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/scripts/importtrace.py +0 -0
  134. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/scripts/slowcat.py +0 -0
  135. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/scripts/tmpexec.py +0 -0
  136. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/secrets.py +0 -0
  137. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/tokens.py +0 -0
  138. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/toml/__init__.py +0 -0
  139. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/toml/parser.py +0 -0
  140. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/toml/writer.py +0 -0
  141. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/tools/__init__.py +0 -0
  142. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/tools/doc.py +0 -0
  143. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/tools/docker.py +0 -0
  144. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/tools/git.py +0 -0
  145. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/tools/importscan.py +0 -0
  146. {omdev-0.0.0.dev140/omdev/pycharm → omdev-0.0.0.dev142/omdev/tools/json}/__init__.py +0 -0
  147. {omdev-0.0.0.dev140/omdev → omdev-0.0.0.dev142/omdev/tools}/json/cli.py +0 -0
  148. {omdev-0.0.0.dev140/omdev → omdev-0.0.0.dev142/omdev/tools}/json/formats.py +0 -0
  149. {omdev-0.0.0.dev140/omdev → omdev-0.0.0.dev142/omdev/tools}/json/io.py +0 -0
  150. {omdev-0.0.0.dev140/omdev → omdev-0.0.0.dev142/omdev/tools}/json/parsing.py +0 -0
  151. {omdev-0.0.0.dev140/omdev → omdev-0.0.0.dev142/omdev/tools}/json/processing.py +0 -0
  152. {omdev-0.0.0.dev140/omdev → omdev-0.0.0.dev142/omdev/tools}/json/rendering.py +0 -0
  153. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/tools/mkrelimp.py +0 -0
  154. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/tools/notebook.py +0 -0
  155. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/tools/pawk/__init__.py +0 -0
  156. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/tools/pawk/__main__.py +0 -0
  157. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/tools/pawk/pawk.py +0 -0
  158. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/tools/pip.py +0 -0
  159. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/tools/prof.py +0 -0
  160. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/tools/qr.py +0 -0
  161. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/tools/sqlrepl.py +0 -0
  162. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev/wheelfile.py +0 -0
  163. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev.egg-info/dependency_links.txt +0 -0
  164. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev.egg-info/entry_points.txt +0 -0
  165. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/omdev.egg-info/top_level.txt +0 -0
  166. {omdev-0.0.0.dev140 → omdev-0.0.0.dev142}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: omdev
3
- Version: 0.0.0.dev140
3
+ Version: 0.0.0.dev142
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.dev140
15
+ Requires-Dist: omlish==0.0.0.dev142
16
16
  Provides-Extra: all
17
17
  Requires-Dist: black~=24.10; extra == "all"
18
18
  Requires-Dist: pycparser~=2.22; extra == "all"
@@ -95,21 +95,6 @@
95
95
  }
96
96
  }
97
97
  },
98
- {
99
- "module": ".json.__main__",
100
- "attr": "_CLI_MODULE",
101
- "file": "omdev/json/__main__.py",
102
- "line": 4,
103
- "value": {
104
- "$.cli.types.CliModule": {
105
- "cmd_name": [
106
- "json",
107
- "j"
108
- ],
109
- "mod_name": "omdev.json.__main__"
110
- }
111
- }
112
- },
113
98
  {
114
99
  "module": ".magic.find",
115
100
  "attr": "_CLI_MODULE",
@@ -230,6 +215,18 @@
230
215
  }
231
216
  }
232
217
  },
218
+ {
219
+ "module": ".tools.cloc",
220
+ "attr": "_CLI_MODULE",
221
+ "file": "omdev/tools/cloc.py",
222
+ "line": 144,
223
+ "value": {
224
+ "$.cli.types.CliModule": {
225
+ "cmd_name": "cloc",
226
+ "mod_name": "omdev.tools.cloc"
227
+ }
228
+ }
229
+ },
233
230
  {
234
231
  "module": ".tools.doc",
235
232
  "attr": "_CLI_MODULE",
@@ -278,6 +275,21 @@
278
275
  }
279
276
  }
280
277
  },
278
+ {
279
+ "module": ".tools.json.__main__",
280
+ "attr": "_CLI_MODULE",
281
+ "file": "omdev/tools/json/__main__.py",
282
+ "line": 4,
283
+ "value": {
284
+ "$.cli.types.CliModule": {
285
+ "cmd_name": [
286
+ "json",
287
+ "j"
288
+ ],
289
+ "mod_name": "omdev.tools.json.__main__"
290
+ }
291
+ }
292
+ },
281
293
  {
282
294
  "module": ".tools.mkrelimp",
283
295
  "attr": "_CLI_MODULE",
@@ -63,6 +63,9 @@ UnparsedVersion = ta.Union['Version', str]
63
63
  UnparsedVersionVar = ta.TypeVar('UnparsedVersionVar', bound=UnparsedVersion)
64
64
  CallableVersionOperator = ta.Callable[['Version', str], bool]
65
65
 
66
+ # ../../omlish/lite/subprocesses.py
67
+ SubprocessChannelOption = ta.Literal['pipe', 'stdout', 'devnull']
68
+
66
69
 
67
70
  ########################################
68
71
  # ../../packaging/versions.py
@@ -1659,6 +1662,16 @@ class Interp:
1659
1662
  ##
1660
1663
 
1661
1664
 
1665
+ SUBPROCESS_CHANNEL_OPTION_VALUES: ta.Mapping[SubprocessChannelOption, int] = {
1666
+ 'pipe': subprocess.PIPE,
1667
+ 'stdout': subprocess.STDOUT,
1668
+ 'devnull': subprocess.DEVNULL,
1669
+ }
1670
+
1671
+
1672
+ ##
1673
+
1674
+
1662
1675
  _SUBPROCESS_SHELL_WRAP_EXECS = False
1663
1676
 
1664
1677
 
@@ -101,6 +101,9 @@ UnparsedVersion = ta.Union['Version', str]
101
101
  UnparsedVersionVar = ta.TypeVar('UnparsedVersionVar', bound=UnparsedVersion)
102
102
  CallableVersionOperator = ta.Callable[['Version', str], bool]
103
103
 
104
+ # ../../omlish/lite/subprocesses.py
105
+ SubprocessChannelOption = ta.Literal['pipe', 'stdout', 'devnull']
106
+
104
107
 
105
108
  ########################################
106
109
  # ../../magic/magic.py
@@ -3300,120 +3303,144 @@ _OBJ_MARSHALER_GENERIC_ITERABLE_TYPES: ta.Dict[ta.Any, type] = {
3300
3303
  }
3301
3304
 
3302
3305
 
3303
- def _make_obj_marshaler(
3304
- ty: ta.Any,
3305
- rec: ta.Callable[[ta.Any], ObjMarshaler],
3306
- *,
3307
- nonstrict_dataclasses: bool = False,
3308
- ) -> ObjMarshaler:
3309
- if isinstance(ty, type):
3310
- if abc.ABC in ty.__bases__:
3311
- return PolymorphicObjMarshaler.of([ # type: ignore
3312
- PolymorphicObjMarshaler.Impl(
3313
- ity,
3314
- ity.__qualname__,
3315
- rec(ity),
3316
- )
3317
- for ity in deep_subclasses(ty)
3318
- if abc.ABC not in ity.__bases__
3319
- ])
3320
-
3321
- if issubclass(ty, enum.Enum):
3322
- return EnumObjMarshaler(ty)
3323
-
3324
- if dc.is_dataclass(ty):
3325
- return DataclassObjMarshaler(
3326
- ty,
3327
- {f.name: rec(f.type) for f in dc.fields(ty)},
3328
- nonstrict=nonstrict_dataclasses,
3329
- )
3306
+ ##
3330
3307
 
3331
- if is_generic_alias(ty):
3332
- try:
3333
- mt = _OBJ_MARSHALER_GENERIC_MAPPING_TYPES[ta.get_origin(ty)]
3334
- except KeyError:
3335
- pass
3336
- else:
3337
- k, v = ta.get_args(ty)
3338
- return MappingObjMarshaler(mt, rec(k), rec(v))
3339
3308
 
3340
- try:
3341
- st = _OBJ_MARSHALER_GENERIC_ITERABLE_TYPES[ta.get_origin(ty)]
3342
- except KeyError:
3343
- pass
3344
- else:
3345
- [e] = ta.get_args(ty)
3346
- return IterableObjMarshaler(st, rec(e))
3309
+ class ObjMarshalerManager:
3310
+ def __init__(
3311
+ self,
3312
+ *,
3313
+ default_obj_marshalers: ta.Dict[ta.Any, ObjMarshaler] = _DEFAULT_OBJ_MARSHALERS, # noqa
3314
+ generic_mapping_types: ta.Dict[ta.Any, type] = _OBJ_MARSHALER_GENERIC_MAPPING_TYPES, # noqa
3315
+ generic_iterable_types: ta.Dict[ta.Any, type] = _OBJ_MARSHALER_GENERIC_ITERABLE_TYPES, # noqa
3316
+ ) -> None:
3317
+ super().__init__()
3347
3318
 
3348
- if is_union_alias(ty):
3349
- return OptionalObjMarshaler(rec(get_optional_alias_arg(ty)))
3319
+ self._obj_marshalers = dict(default_obj_marshalers)
3320
+ self._generic_mapping_types = generic_mapping_types
3321
+ self._generic_iterable_types = generic_iterable_types
3350
3322
 
3351
- raise TypeError(ty)
3323
+ self._lock = threading.RLock()
3324
+ self._marshalers: ta.Dict[ta.Any, ObjMarshaler] = dict(_DEFAULT_OBJ_MARSHALERS)
3325
+ self._proxies: ta.Dict[ta.Any, ProxyObjMarshaler] = {}
3352
3326
 
3327
+ #
3353
3328
 
3354
- ##
3329
+ def make_obj_marshaler(
3330
+ self,
3331
+ ty: ta.Any,
3332
+ rec: ta.Callable[[ta.Any], ObjMarshaler],
3333
+ *,
3334
+ nonstrict_dataclasses: bool = False,
3335
+ ) -> ObjMarshaler:
3336
+ if isinstance(ty, type):
3337
+ if abc.ABC in ty.__bases__:
3338
+ return PolymorphicObjMarshaler.of([ # type: ignore
3339
+ PolymorphicObjMarshaler.Impl(
3340
+ ity,
3341
+ ity.__qualname__,
3342
+ rec(ity),
3343
+ )
3344
+ for ity in deep_subclasses(ty)
3345
+ if abc.ABC not in ity.__bases__
3346
+ ])
3347
+
3348
+ if issubclass(ty, enum.Enum):
3349
+ return EnumObjMarshaler(ty)
3350
+
3351
+ if dc.is_dataclass(ty):
3352
+ return DataclassObjMarshaler(
3353
+ ty,
3354
+ {f.name: rec(f.type) for f in dc.fields(ty)},
3355
+ nonstrict=nonstrict_dataclasses,
3356
+ )
3355
3357
 
3358
+ if is_generic_alias(ty):
3359
+ try:
3360
+ mt = self._generic_mapping_types[ta.get_origin(ty)]
3361
+ except KeyError:
3362
+ pass
3363
+ else:
3364
+ k, v = ta.get_args(ty)
3365
+ return MappingObjMarshaler(mt, rec(k), rec(v))
3356
3366
 
3357
- _OBJ_MARSHALERS_LOCK = threading.RLock()
3367
+ try:
3368
+ st = self._generic_iterable_types[ta.get_origin(ty)]
3369
+ except KeyError:
3370
+ pass
3371
+ else:
3372
+ [e] = ta.get_args(ty)
3373
+ return IterableObjMarshaler(st, rec(e))
3358
3374
 
3359
- _OBJ_MARSHALERS: ta.Dict[ta.Any, ObjMarshaler] = dict(_DEFAULT_OBJ_MARSHALERS)
3375
+ if is_union_alias(ty):
3376
+ return OptionalObjMarshaler(rec(get_optional_alias_arg(ty)))
3360
3377
 
3361
- _OBJ_MARSHALER_PROXIES: ta.Dict[ta.Any, ProxyObjMarshaler] = {}
3378
+ raise TypeError(ty)
3362
3379
 
3380
+ #
3363
3381
 
3364
- def register_opj_marshaler(ty: ta.Any, m: ObjMarshaler) -> None:
3365
- with _OBJ_MARSHALERS_LOCK:
3366
- if ty in _OBJ_MARSHALERS:
3367
- raise KeyError(ty)
3368
- _OBJ_MARSHALERS[ty] = m
3382
+ def register_opj_marshaler(self, ty: ta.Any, m: ObjMarshaler) -> None:
3383
+ with self._lock:
3384
+ if ty in self._obj_marshalers:
3385
+ raise KeyError(ty)
3386
+ self._obj_marshalers[ty] = m
3369
3387
 
3388
+ def get_obj_marshaler(
3389
+ self,
3390
+ ty: ta.Any,
3391
+ *,
3392
+ no_cache: bool = False,
3393
+ **kwargs: ta.Any,
3394
+ ) -> ObjMarshaler:
3395
+ with self._lock:
3396
+ if not no_cache:
3397
+ try:
3398
+ return self._obj_marshalers[ty]
3399
+ except KeyError:
3400
+ pass
3370
3401
 
3371
- def get_obj_marshaler(
3372
- ty: ta.Any,
3373
- *,
3374
- no_cache: bool = False,
3375
- **kwargs: ta.Any,
3376
- ) -> ObjMarshaler:
3377
- with _OBJ_MARSHALERS_LOCK:
3378
- if not no_cache:
3379
3402
  try:
3380
- return _OBJ_MARSHALERS[ty]
3403
+ return self._proxies[ty]
3381
3404
  except KeyError:
3382
3405
  pass
3383
3406
 
3384
- try:
3385
- return _OBJ_MARSHALER_PROXIES[ty]
3386
- except KeyError:
3387
- pass
3407
+ rec = functools.partial(
3408
+ self.get_obj_marshaler,
3409
+ no_cache=no_cache,
3410
+ **kwargs,
3411
+ )
3388
3412
 
3389
- rec = functools.partial(
3390
- get_obj_marshaler,
3391
- no_cache=no_cache,
3392
- **kwargs,
3393
- )
3413
+ p = ProxyObjMarshaler()
3414
+ self._proxies[ty] = p
3415
+ try:
3416
+ m = self.make_obj_marshaler(ty, rec, **kwargs)
3417
+ finally:
3418
+ del self._proxies[ty]
3419
+ p.m = m
3394
3420
 
3395
- p = ProxyObjMarshaler()
3396
- _OBJ_MARSHALER_PROXIES[ty] = p
3397
- try:
3398
- m = _make_obj_marshaler(ty, rec, **kwargs)
3399
- finally:
3400
- del _OBJ_MARSHALER_PROXIES[ty]
3401
- p.m = m
3421
+ if not no_cache:
3422
+ self._obj_marshalers[ty] = m
3423
+ return m
3424
+
3425
+ #
3402
3426
 
3403
- if not no_cache:
3404
- _OBJ_MARSHALERS[ty] = m
3405
- return m
3427
+ def marshal_obj(self, o: ta.Any, ty: ta.Any = None) -> ta.Any:
3428
+ return self.get_obj_marshaler(ty if ty is not None else type(o)).marshal(o)
3429
+
3430
+ def unmarshal_obj(self, o: ta.Any, ty: ta.Union[ta.Type[T], ta.Any]) -> T:
3431
+ return self.get_obj_marshaler(ty).unmarshal(o)
3406
3432
 
3407
3433
 
3408
3434
  ##
3409
3435
 
3410
3436
 
3411
- def marshal_obj(o: ta.Any, ty: ta.Any = None) -> ta.Any:
3412
- return get_obj_marshaler(ty if ty is not None else type(o)).marshal(o)
3437
+ OBJ_MARSHALER_MANAGER = ObjMarshalerManager()
3413
3438
 
3439
+ register_opj_marshaler = OBJ_MARSHALER_MANAGER.register_opj_marshaler
3440
+ get_obj_marshaler = OBJ_MARSHALER_MANAGER.get_obj_marshaler
3414
3441
 
3415
- def unmarshal_obj(o: ta.Any, ty: ta.Union[ta.Type[T], ta.Any]) -> T:
3416
- return get_obj_marshaler(ty).unmarshal(o)
3442
+ marshal_obj = OBJ_MARSHALER_MANAGER.marshal_obj
3443
+ unmarshal_obj = OBJ_MARSHALER_MANAGER.unmarshal_obj
3417
3444
 
3418
3445
 
3419
3446
  ########################################
@@ -3706,6 +3733,16 @@ class RequirementsRewriter:
3706
3733
  ##
3707
3734
 
3708
3735
 
3736
+ SUBPROCESS_CHANNEL_OPTION_VALUES: ta.Mapping[SubprocessChannelOption, int] = {
3737
+ 'pipe': subprocess.PIPE,
3738
+ 'stdout': subprocess.STDOUT,
3739
+ 'devnull': subprocess.DEVNULL,
3740
+ }
3741
+
3742
+
3743
+ ##
3744
+
3745
+
3709
3746
  _SUBPROCESS_SHELL_WRAP_EXECS = False
3710
3747
 
3711
3748
 
@@ -0,0 +1,149 @@
1
+ import dataclasses as dc
2
+ import os
3
+ import re
4
+ import typing as ta
5
+
6
+ from ..cli import CliModule
7
+
8
+
9
+ SUPPORTED_EXTENSIONS: ta.Mapping[str, str] = {
10
+ '.c': 'c',
11
+ '.cpp': 'c',
12
+ '.h': 'c',
13
+ '.hpp': 'c',
14
+ '.py': 'python',
15
+ '.js': 'javascript',
16
+ }
17
+
18
+
19
+ COMMENT_PATTERNS: ta.Mapping[str, tuple[str, str | None, str | None]] = {
20
+ 'c': (r'//', r'/\*', r'\*/'),
21
+ 'python': (r'#', None, None),
22
+ 'javascript': (r'//', r'/\*', r'\*/'),
23
+ }
24
+
25
+
26
+ @dc.dataclass(frozen=True)
27
+ class FileLineCount:
28
+ loc: int
29
+ blanks: int
30
+ comments: int
31
+
32
+
33
+ def count_lines(file_path: str, language: str) -> FileLineCount:
34
+ single_line_comment, block_comment_start, block_comment_end = COMMENT_PATTERNS[language]
35
+
36
+ in_block_comment = False
37
+
38
+ loc = 0
39
+ blank_lines = 0
40
+ comment_lines = 0
41
+
42
+ with open(file_path, encoding='utf-8') as file:
43
+ for line in file:
44
+ stripped = line.strip()
45
+ if not stripped:
46
+ blank_lines += 1
47
+ continue
48
+
49
+ if in_block_comment:
50
+ comment_lines += 1
51
+ if block_comment_end and re.search(block_comment_end, stripped):
52
+ in_block_comment = False
53
+ continue
54
+
55
+ if block_comment_start and re.search(block_comment_start, stripped):
56
+ comment_lines += 1
57
+ if block_comment_end and not re.search(block_comment_end, stripped):
58
+ in_block_comment = True
59
+ continue
60
+
61
+ if single_line_comment and stripped.startswith(single_line_comment):
62
+ comment_lines += 1
63
+ continue
64
+
65
+ loc += 1
66
+
67
+ return FileLineCount(
68
+ loc=loc,
69
+ blanks=blank_lines,
70
+ comments=comment_lines,
71
+ )
72
+
73
+
74
+ def count_lines_in_directory(directory: str) -> ta.Mapping[str, FileLineCount]:
75
+ results: dict[str, FileLineCount] = {}
76
+ for root, _, files in os.walk(directory):
77
+ for file in files:
78
+ ext = os.path.splitext(file)[1]
79
+ if ext in SUPPORTED_EXTENSIONS:
80
+ language = SUPPORTED_EXTENSIONS[ext]
81
+ file_path = os.path.join(root, file)
82
+ results[file_path] = count_lines(file_path, language)
83
+ return results
84
+
85
+
86
+ def display_results(results: ta.Mapping[str, FileLineCount]) -> None:
87
+ total_loc = total_blanks = total_comments = 0
88
+ file_width = max(map(len, results))
89
+ dash_width = 41 + file_width
90
+
91
+ print(
92
+ f"{'File'.ljust(file_width)} "
93
+ f"{'LOC':<10} "
94
+ f"{'Blank Lines':<15} "
95
+ f"{'Comment Lines':<15}",
96
+ )
97
+
98
+ print('-' * dash_width)
99
+
100
+ for file, counts in sorted(results.items()):
101
+ loc, blanks, comments = counts.loc, counts.blanks, counts.comments
102
+ total_loc += loc
103
+ total_blanks += blanks
104
+ total_comments += comments
105
+ print(
106
+ f'{file.ljust(file_width)} '
107
+ f'{loc:<10} '
108
+ f'{blanks:<15} '
109
+ f'{comments:<15}',
110
+ )
111
+
112
+ print('-' * dash_width)
113
+
114
+ print(
115
+ f"{' ' * file_width} "
116
+ f"{'LOC':<10} "
117
+ f"{'Blank Lines':<15} "
118
+ f"{'Comment Lines':<15}",
119
+ )
120
+
121
+ print('-' * dash_width)
122
+
123
+ print(
124
+ f"{'Total'.ljust(file_width)} "
125
+ f"{total_loc:<10} "
126
+ f"{total_blanks:<15} "
127
+ f"{total_comments:<15}",
128
+ )
129
+
130
+
131
+ def _main() -> None:
132
+ import argparse
133
+
134
+ parser = argparse.ArgumentParser(description='Count lines of code in source files.')
135
+ parser.add_argument('directory', help='The directory to analyze.', nargs='+')
136
+ args = parser.parse_args()
137
+
138
+ for directory in args.directory:
139
+ results = count_lines_in_directory(directory)
140
+ display_results(results)
141
+ print()
142
+
143
+
144
+ # @omlish-manifest
145
+ _CLI_MODULE = CliModule('cloc', __name__)
146
+
147
+
148
+ if __name__ == '__main__':
149
+ _main()
@@ -1,4 +1,4 @@
1
- from ..cli import CliModule
1
+ from ...cli import CliModule
2
2
 
3
3
 
4
4
  # @omlish-manifest
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: omdev
3
- Version: 0.0.0.dev140
3
+ Version: 0.0.0.dev142
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.dev140
15
+ Requires-Dist: omlish==0.0.0.dev142
16
16
  Provides-Extra: all
17
17
  Requires-Dist: black~=24.10; extra == "all"
18
18
  Requires-Dist: pycparser~=2.22; extra == "all"
@@ -89,14 +89,6 @@ omdev/interp/resolvers.py
89
89
  omdev/interp/standalone.py
90
90
  omdev/interp/system.py
91
91
  omdev/interp/types.py
92
- omdev/json/__init__.py
93
- omdev/json/__main__.py
94
- omdev/json/cli.py
95
- omdev/json/formats.py
96
- omdev/json/io.py
97
- omdev/json/parsing.py
98
- omdev/json/processing.py
99
- omdev/json/rendering.py
100
92
  omdev/magic/__init__.py
101
93
  omdev/magic/find.py
102
94
  omdev/magic/magic.py
@@ -148,6 +140,7 @@ omdev/toml/__init__.py
148
140
  omdev/toml/parser.py
149
141
  omdev/toml/writer.py
150
142
  omdev/tools/__init__.py
143
+ omdev/tools/cloc.py
151
144
  omdev/tools/doc.py
152
145
  omdev/tools/docker.py
153
146
  omdev/tools/git.py
@@ -158,6 +151,14 @@ omdev/tools/pip.py
158
151
  omdev/tools/prof.py
159
152
  omdev/tools/qr.py
160
153
  omdev/tools/sqlrepl.py
154
+ omdev/tools/json/__init__.py
155
+ omdev/tools/json/__main__.py
156
+ omdev/tools/json/cli.py
157
+ omdev/tools/json/formats.py
158
+ omdev/tools/json/io.py
159
+ omdev/tools/json/parsing.py
160
+ omdev/tools/json/processing.py
161
+ omdev/tools/json/rendering.py
161
162
  omdev/tools/pawk/__init__.py
162
163
  omdev/tools/pawk/__main__.py
163
164
  omdev/tools/pawk/pawk.py
@@ -1,4 +1,4 @@
1
- omlish==0.0.0.dev140
1
+ omlish==0.0.0.dev142
2
2
 
3
3
  [all]
4
4
  black~=24.10
@@ -12,7 +12,7 @@ authors = [
12
12
  urls = {source = 'https://github.com/wrmsr/omlish'}
13
13
  license = {text = 'BSD-3-Clause'}
14
14
  requires-python = '>=3.12'
15
- version = '0.0.0.dev140'
15
+ version = '0.0.0.dev142'
16
16
  classifiers = [
17
17
  'License :: OSI Approved :: BSD License',
18
18
  'Development Status :: 2 - Pre-Alpha',
@@ -22,7 +22,7 @@ classifiers = [
22
22
  ]
23
23
  description = 'omdev'
24
24
  dependencies = [
25
- 'omlish == 0.0.0.dev140',
25
+ 'omlish == 0.0.0.dev142',
26
26
  ]
27
27
 
28
28
  [project.optional-dependencies]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes