codeguardian-cli 1.0.2__py3-none-any.whl → 1.2.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.
@@ -1,39 +1,50 @@
1
1
  from pathlib import Path
2
+ import os
2
3
 
3
4
  IGNORE_DIRS = {
4
- "venv",
5
+ "venv",
5
6
  ".venv",
6
7
  ".git",
7
8
  "__pycache__",
8
- ".pytest_cache",
9
+ ".pytest_cache",
9
10
  "node_modules",
10
11
  "dist",
11
12
  "build",
12
13
  "tests",
13
-
14
14
  }
15
15
 
16
16
 
17
- def discover_files(project_path, extensions) -> list[Path]:
18
-
19
-
17
+ def discover_files(project_path, extensions):
20
18
 
21
19
  project_path = Path(project_path)
22
20
 
23
21
  files = []
24
22
 
25
- for file in project_path.rglob("*"):
23
+ for root, dirs, filenames in os.walk(project_path):
24
+
25
+ # Ignore predefined directories
26
+ dirs[:] = [
27
+ d for d in dirs
28
+ if d not in IGNORE_DIRS
29
+ ]
26
30
 
27
- if any(part in IGNORE_DIRS for part in file.parts):
28
- continue
31
+ # Ignore Python virtual environments
32
+ dirs[:] = [
33
+ d for d in dirs
34
+ if not (Path(root) / d / "pyvenv.cfg").exists()
35
+ ]
29
36
 
30
- if file.name.startswith("test_"):
31
- continue
37
+ for filename in filenames:
32
38
 
33
- if file.is_file() and file.suffix in extensions:
34
- files.append(file)
39
+ file_path = Path(root) / filename
35
40
 
36
- return files
41
+ if filename.startswith("test_"):
42
+ continue
37
43
 
44
+ if (
45
+ file_path.is_file()
46
+ and file_path.suffix in extensions
47
+ ):
48
+ files.append(file_path)
38
49
 
39
-
50
+ return files
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codeguardian-cli
3
- Version: 1.0.2
3
+ Version: 1.2.2
4
4
  Summary: Architecture and code quality analyzer
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -27,7 +27,7 @@ CODEGUARDIAN/rules/controllers/user_controller.py,sha256=To6ZzyBi5cV7AZBD8DjG-u7
27
27
  CODEGUARDIAN/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
28
  CODEGUARDIAN/src/main.py,sha256=8Es65AMa5M27CpwNMt5dGZahoNND2P7CJLyiWnYqoz0,1130
29
29
  CODEGUARDIAN/src/discovery/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
- CODEGUARDIAN/src/discovery/finder.py,sha256=_RMNm-9nmHOTkq7D1TUafkVmJ8KUgDHhO5NDkulx_LM,619
30
+ CODEGUARDIAN/src/discovery/finder.py,sha256=gsZkqffNpwShpKLKUKW_0e2Apt-A2ugHzVljAve75lE,979
31
31
  CODEGUARDIAN/src/extractor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
32
  CODEGUARDIAN/src/extractor/class_extractor.py,sha256=PkI9d4i0J_ZFl8_DphL4q1WR_ohSbQ3VLBILhjJmvGA,628
33
33
  CODEGUARDIAN/src/extractor/function_extractor.py,sha256=T34m0zvHW1XQ2c_eBI98VjuTSH6DkQqBJGlUvvSPEX4,381
@@ -43,8 +43,8 @@ CODEGUARDIAN/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
43
43
  CODEGUARDIAN/utils/ast_cache.py,sha256=XVbOWW_Iw-I3bge8mI923WfYCyEn9GZCyMWkYLe8_aI,777
44
44
  CODEGUARDIAN/utils/file_cache.py,sha256=BCjiSAwZZYOq_pV57yWvrzBov8yPlkG_ZHsnSdaBZr8,510
45
45
  CODEGUARDIAN/utils/layer_utils.py,sha256=QpUawYG8f5qjtIuXP0QBKEI_-W9kgHX9F2X_AvzrehM,248
46
- codeguardian_cli-1.0.2.dist-info/METADATA,sha256=Zf8giOxhDQ9LyFpdKR-9q_ztXO7FO6zGQY8_cf1AbNw,884
47
- codeguardian_cli-1.0.2.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
48
- codeguardian_cli-1.0.2.dist-info/entry_points.txt,sha256=I4OdLGA4ilsjlUDtu9NrmkswYu8vIjIpMaLL8koX11g,55
49
- codeguardian_cli-1.0.2.dist-info/top_level.txt,sha256=FCCh2epuHzvBi_N-MJr-PFIPrWydRx1kRSDBVAdYbOw,13
50
- codeguardian_cli-1.0.2.dist-info/RECORD,,
46
+ codeguardian_cli-1.2.2.dist-info/METADATA,sha256=DuO7-spe9OIbXm_Bg0sYELeu994uHrQAOpGTfkUwgTs,884
47
+ codeguardian_cli-1.2.2.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
48
+ codeguardian_cli-1.2.2.dist-info/entry_points.txt,sha256=I4OdLGA4ilsjlUDtu9NrmkswYu8vIjIpMaLL8koX11g,55
49
+ codeguardian_cli-1.2.2.dist-info/top_level.txt,sha256=FCCh2epuHzvBi_N-MJr-PFIPrWydRx1kRSDBVAdYbOw,13
50
+ codeguardian_cli-1.2.2.dist-info/RECORD,,