omdev 0.0.0.dev164__tar.gz → 0.0.0.dev166__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.
- {omdev-0.0.0.dev164/omdev.egg-info → omdev-0.0.0.dev166}/PKG-INFO +2 -2
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/.manifests.json +1 -1
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tools/cloc.py +56 -6
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166/omdev.egg-info}/PKG-INFO +2 -2
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev.egg-info/requires.txt +1 -1
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/pyproject.toml +2 -2
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/LICENSE +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/MANIFEST.in +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/README.rst +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/__about__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/amalg/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/amalg/__main__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/amalg/gen.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/amalg/imports.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/amalg/main.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/amalg/manifests.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/amalg/resources.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/amalg/srcfiles.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/amalg/strip.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/amalg/types.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/amalg/typing.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/antlr/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/antlr/consts.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/antlr/gen.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/bracepy.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cache/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cache/compute/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cache/compute/cache.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cache/compute/contexts.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cache/compute/currents.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cache/compute/fns.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cache/compute/resolvers.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cache/compute/storage.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cache/compute/types.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cache/data/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cache/data/actions.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cache/data/cache.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cache/data/consts.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cache/data/defaults.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cache/data/manifests.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cache/data/specs.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cexts/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cexts/_boilerplate.cc +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cexts/_distutils/LICENSE +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cexts/_distutils/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cexts/_distutils/build_ext.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cexts/_distutils/compilers/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cexts/_distutils/compilers/ccompiler.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cexts/_distutils/compilers/options.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cexts/_distutils/compilers/unixccompiler.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cexts/_distutils/dir_util.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cexts/_distutils/errors.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cexts/_distutils/extension.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cexts/_distutils/file_util.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cexts/_distutils/modified.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cexts/_distutils/spawn.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cexts/_distutils/sysconfig.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cexts/_distutils/util.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cexts/_distutils/version.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cexts/build.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cexts/cmake.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cexts/importhook.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cexts/magic.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cexts/scan.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/classdot.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cli/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cli/__main__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cli/_pathhack.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cli/clicli.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cli/install.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cli/main.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cli/managers.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cli/types.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/clipboard/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/clipboard/clipboard.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/clipboard/darwin_cf.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/clipboard/linux_x11.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/cmake.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/findimports.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/git/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/git/revisions.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/git/status.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/git/subtrees.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/imgur.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/interp/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/interp/__main__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/interp/cli.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/interp/inspect.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/interp/providers.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/interp/pyenv.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/interp/resolvers.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/interp/standalone.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/interp/system.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/interp/types.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/magic/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/magic/find.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/magic/magic.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/magic/prepare.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/magic/styles.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/manifests/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/manifests/__main__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/manifests/build.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/manifests/main.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/mypy/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/mypy/debug.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/packaging/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/packaging/marshal.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/packaging/names.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/packaging/requires.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/packaging/specifiers.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/packaging/versions.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/pip.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/precheck/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/precheck/__main__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/precheck/base.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/precheck/git.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/precheck/lite.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/precheck/main.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/precheck/manifests.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/precheck/scripts.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/ptk/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/ptk/apps/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/ptk/apps/ncdu.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/pycharm/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/pycharm/__main__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/pycharm/cli.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/pyproject/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/pyproject/__main__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/pyproject/cexts.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/pyproject/cli.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/pyproject/configs.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/pyproject/pkg.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/pyproject/reqs.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/pyproject/venvs.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/revisions.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/scripts/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/scripts/bumpversion.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/scripts/execrss.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/scripts/exectime.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/scripts/importtrace.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/scripts/interp.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/scripts/pyproject.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/scripts/slowcat.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/scripts/tmpexec.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/secrets.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tokens.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/toml/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/toml/parser.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/toml/writer.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tools/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tools/doc.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tools/docker.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tools/git.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tools/importscan.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tools/json/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tools/json/__main__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tools/json/cli.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tools/json/formats.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tools/json/io.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tools/json/parsing.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tools/json/processing.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tools/json/rendering.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tools/mkrelimp.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tools/notebook.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tools/pawk/__init__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tools/pawk/__main__.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tools/pawk/pawk.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tools/pip.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tools/prof.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tools/qr.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/tools/sqlrepl.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev/wheelfile.py +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev.egg-info/SOURCES.txt +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev.egg-info/dependency_links.txt +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev.egg-info/entry_points.txt +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/omdev.egg-info/top_level.txt +0 -0
- {omdev-0.0.0.dev164 → omdev-0.0.0.dev166}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: omdev
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev166
|
|
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.dev166
|
|
16
16
|
Provides-Extra: all
|
|
17
17
|
Requires-Dist: black~=24.10; extra == "all"
|
|
18
18
|
Requires-Dist: pycparser~=2.22; extra == "all"
|
|
@@ -71,15 +71,29 @@ def count_lines(file_path: str, language: str) -> FileLineCount:
|
|
|
71
71
|
)
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
def count_lines_in_directory(
|
|
74
|
+
def count_lines_in_directory(
|
|
75
|
+
directory: str,
|
|
76
|
+
*,
|
|
77
|
+
include: list[re.Pattern[str]] | None = None,
|
|
78
|
+
exclude: list[re.Pattern[str]] | None = None,
|
|
79
|
+
) -> ta.Mapping[str, FileLineCount]:
|
|
75
80
|
results: dict[str, FileLineCount] = {}
|
|
76
81
|
for root, _, files in os.walk(directory):
|
|
77
82
|
for file in files:
|
|
78
83
|
ext = os.path.splitext(file)[1]
|
|
79
|
-
if ext in SUPPORTED_EXTENSIONS:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
84
|
+
if ext not in SUPPORTED_EXTENSIONS:
|
|
85
|
+
continue
|
|
86
|
+
|
|
87
|
+
file_path = os.path.join(root, file)
|
|
88
|
+
|
|
89
|
+
if include and not any(p.fullmatch(file_path) for p in include):
|
|
90
|
+
continue
|
|
91
|
+
if exclude and any(p.fullmatch(file_path) for p in exclude):
|
|
92
|
+
continue
|
|
93
|
+
|
|
94
|
+
language = SUPPORTED_EXTENSIONS[ext]
|
|
95
|
+
results[file_path] = count_lines(file_path, language)
|
|
96
|
+
|
|
83
97
|
return results
|
|
84
98
|
|
|
85
99
|
|
|
@@ -132,14 +146,50 @@ def _main() -> None:
|
|
|
132
146
|
import argparse
|
|
133
147
|
|
|
134
148
|
parser = argparse.ArgumentParser(description='Count lines of code in source files.')
|
|
149
|
+
|
|
135
150
|
parser.add_argument('directory', help='The directory to analyze.', nargs='+')
|
|
151
|
+
|
|
152
|
+
parser.add_argument('-i,', '--include', action='append')
|
|
153
|
+
parser.add_argument('-e,', '--exclude', action='append')
|
|
154
|
+
|
|
136
155
|
args = parser.parse_args()
|
|
137
156
|
|
|
157
|
+
#
|
|
158
|
+
|
|
159
|
+
include: list[re.Pattern[str]] | None = None
|
|
160
|
+
if args.include:
|
|
161
|
+
include = [re.compile(p) for p in args.include]
|
|
162
|
+
|
|
163
|
+
exclude: list[re.Pattern[str]] | None = None
|
|
164
|
+
if args.exclude:
|
|
165
|
+
exclude = [re.compile(p) for p in args.exclude]
|
|
166
|
+
|
|
167
|
+
#
|
|
168
|
+
|
|
169
|
+
results_by_directory: dict[str, FileLineCount] = {}
|
|
138
170
|
for directory in args.directory:
|
|
139
|
-
results = count_lines_in_directory(
|
|
171
|
+
results = count_lines_in_directory(
|
|
172
|
+
directory,
|
|
173
|
+
include=include,
|
|
174
|
+
exclude=exclude,
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
if not results:
|
|
178
|
+
continue
|
|
179
|
+
|
|
140
180
|
display_results(results)
|
|
141
181
|
print()
|
|
142
182
|
|
|
183
|
+
results_by_directory[directory] = FileLineCount(
|
|
184
|
+
loc=sum(flc.loc for flc in results.values()),
|
|
185
|
+
blanks=sum(flc.blanks for flc in results.values()),
|
|
186
|
+
comments=sum(flc.comments for flc in results.values()),
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
if len(results_by_directory) > 1:
|
|
190
|
+
display_results(results_by_directory)
|
|
191
|
+
print()
|
|
192
|
+
|
|
143
193
|
|
|
144
194
|
# @omlish-manifest
|
|
145
195
|
_CLI_MODULE = CliModule('cloc', __name__)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: omdev
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev166
|
|
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.dev166
|
|
16
16
|
Provides-Extra: all
|
|
17
17
|
Requires-Dist: black~=24.10; extra == "all"
|
|
18
18
|
Requires-Dist: pycparser~=2.22; extra == "all"
|
|
@@ -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.
|
|
15
|
+
version = '0.0.0.dev166'
|
|
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.
|
|
25
|
+
'omlish == 0.0.0.dev166',
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|