auto-coder 0.1.314__py3-none-any.whl → 0.1.315__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 auto-coder might be problematic. Click here for more details.
- {auto_coder-0.1.314.dist-info → auto_coder-0.1.315.dist-info}/METADATA +1 -1
- {auto_coder-0.1.314.dist-info → auto_coder-0.1.315.dist-info}/RECORD +12 -7
- autocoder/linters/__init__.py +0 -0
- autocoder/linters/base_linter.py +108 -0
- autocoder/linters/code_linter.py +588 -0
- autocoder/linters/linter_factory.py +243 -0
- autocoder/linters/python_linter.py +616 -0
- autocoder/version.py +1 -1
- {auto_coder-0.1.314.dist-info → auto_coder-0.1.315.dist-info}/LICENSE +0 -0
- {auto_coder-0.1.314.dist-info → auto_coder-0.1.315.dist-info}/WHEEL +0 -0
- {auto_coder-0.1.314.dist-info → auto_coder-0.1.315.dist-info}/entry_points.txt +0 -0
- {auto_coder-0.1.314.dist-info → auto_coder-0.1.315.dist-info}/top_level.txt +0 -0
|
@@ -14,7 +14,7 @@ autocoder/command_parser.py,sha256=fx1g9E6GaM273lGTcJqaFQ-hoksS_Ik2glBMnVltPCE,1
|
|
|
14
14
|
autocoder/lang.py,sha256=U6AjVV8Rs1uLyjFCZ8sT6WWuNUxMBqkXXIOs4S120uk,14511
|
|
15
15
|
autocoder/models.py,sha256=AyoZ-Pzy0oyYUmWCxOIRiOImsqboSfRET7LO9-UOuxI,11172
|
|
16
16
|
autocoder/run_context.py,sha256=IUfSO6_gp2Wt1blFWAmOpN0b0nDrTTk4LmtCYUBIoro,1643
|
|
17
|
-
autocoder/version.py,sha256=
|
|
17
|
+
autocoder/version.py,sha256=oUd9EIHW9z0ngi8UCDssrSs_Hmr8M7ImViaqI7Br3bc,23
|
|
18
18
|
autocoder/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
19
|
autocoder/agent/auto_demand_organizer.py,sha256=URAq0gSEiHeV_W4zwhOI_83kHz0Ryfj1gcfh5jwCv_w,6501
|
|
20
20
|
autocoder/agent/auto_filegroup.py,sha256=pBsAkBcpFTff-9L5OwI8xhf2xPKpl-aZwz-skF2B6dc,6296
|
|
@@ -118,6 +118,11 @@ autocoder/index/types.py,sha256=a2s_KV5FJlq7jqA2ELSo9E1sjuLwDB-JJYMhSpzBAhU,596
|
|
|
118
118
|
autocoder/index/filter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
119
119
|
autocoder/index/filter/normal_filter.py,sha256=MI-8xdXCrniaxYCHVTLkq5tafvcUiauD3LN0b3ymRXI,8361
|
|
120
120
|
autocoder/index/filter/quick_filter.py,sha256=ozESEgy506FQ5ecjOumyo4D_KMrterB1QLmnVtiyOiM,43264
|
|
121
|
+
autocoder/linters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
122
|
+
autocoder/linters/base_linter.py,sha256=1_0DPESnSyF3ZcQhoFkBYJylT5w-B61Rx-3A9uhuPlg,3066
|
|
123
|
+
autocoder/linters/code_linter.py,sha256=JylTj-Mj4jl9-XSH3PVlbQ4l55Y6E1FG-glv860CGSs,22462
|
|
124
|
+
autocoder/linters/linter_factory.py,sha256=JKX0D_E-mSK1aeltc0jyW9iRomk4b07VnvnhpoMy6sk,9633
|
|
125
|
+
autocoder/linters/python_linter.py,sha256=MYUkJxt2lUfb9Awpgut2kz95uP-Z-0jToLN4Bn46f48,22691
|
|
121
126
|
autocoder/memory/__init__.py,sha256=5FeGvsesRViYL4BkFiHw9SdlyHeWlqALpTyqOpfnBRw,179
|
|
122
127
|
autocoder/memory/active_context_manager.py,sha256=zeBOhOrlSeUU2-qaJPDCEGryJ5IorTrdsDoRJ3FHOac,33238
|
|
123
128
|
autocoder/memory/active_package.py,sha256=ccTs5BTrbno0Ji2YHdNfA4j1JbBTuTCvpW5bLl5xfiY,25336
|
|
@@ -200,9 +205,9 @@ autocoder/utils/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
200
205
|
autocoder/utils/auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
201
206
|
autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=xuBeWD0YOckqRo8JB1WkVIMOYH6c24m7JfV4svBfPDo,15113
|
|
202
207
|
autocoder/utils/chat_auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
203
|
-
auto_coder-0.1.
|
|
204
|
-
auto_coder-0.1.
|
|
205
|
-
auto_coder-0.1.
|
|
206
|
-
auto_coder-0.1.
|
|
207
|
-
auto_coder-0.1.
|
|
208
|
-
auto_coder-0.1.
|
|
208
|
+
auto_coder-0.1.315.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
209
|
+
auto_coder-0.1.315.dist-info/METADATA,sha256=niXHfYClyecwZuoE1EB8cKAMzYv1Vkk7etV96vseDPo,2747
|
|
210
|
+
auto_coder-0.1.315.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
211
|
+
auto_coder-0.1.315.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
|
|
212
|
+
auto_coder-0.1.315.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
|
|
213
|
+
auto_coder-0.1.315.dist-info/RECORD,,
|
|
File without changes
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Module for code linting capabilities across multiple programming languages.
|
|
3
|
+
This module provides a base abstract class for various language-specific linters.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import os
|
|
7
|
+
from abc import ABC, abstractmethod
|
|
8
|
+
from typing import Dict, Any, List, Optional
|
|
9
|
+
|
|
10
|
+
class BaseLinter(ABC):
|
|
11
|
+
"""
|
|
12
|
+
Base abstract class for all language-specific linters.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, verbose: bool = False):
|
|
16
|
+
"""
|
|
17
|
+
Initialize the base linter.
|
|
18
|
+
|
|
19
|
+
Args:
|
|
20
|
+
verbose (bool): Whether to display verbose output.
|
|
21
|
+
"""
|
|
22
|
+
self.verbose = verbose
|
|
23
|
+
|
|
24
|
+
@abstractmethod
|
|
25
|
+
def _check_dependencies(self) -> bool:
|
|
26
|
+
"""
|
|
27
|
+
Check if required dependencies are installed.
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
bool: True if all dependencies are available, False otherwise.
|
|
31
|
+
"""
|
|
32
|
+
pass
|
|
33
|
+
|
|
34
|
+
@abstractmethod
|
|
35
|
+
def lint_file(self, file_path: str, fix: bool = False) -> Dict[str, Any]:
|
|
36
|
+
"""
|
|
37
|
+
Lint a single file.
|
|
38
|
+
|
|
39
|
+
Args:
|
|
40
|
+
file_path (str): Path to the file to lint.
|
|
41
|
+
fix (bool): Whether to automatically fix fixable issues.
|
|
42
|
+
|
|
43
|
+
Returns:
|
|
44
|
+
Dict[str, Any]: Lint results.
|
|
45
|
+
"""
|
|
46
|
+
pass
|
|
47
|
+
|
|
48
|
+
@abstractmethod
|
|
49
|
+
def lint_project(self, project_path: str, fix: bool = False) -> Dict[str, Any]:
|
|
50
|
+
"""
|
|
51
|
+
Lint an entire project.
|
|
52
|
+
|
|
53
|
+
Args:
|
|
54
|
+
project_path (str): Path to the project directory.
|
|
55
|
+
fix (bool): Whether to automatically fix fixable issues.
|
|
56
|
+
|
|
57
|
+
Returns:
|
|
58
|
+
Dict[str, Any]: Lint results.
|
|
59
|
+
"""
|
|
60
|
+
pass
|
|
61
|
+
|
|
62
|
+
@abstractmethod
|
|
63
|
+
def format_lint_result(self, lint_result: Dict[str, Any]) -> str:
|
|
64
|
+
"""
|
|
65
|
+
Format lint results into a human-readable string.
|
|
66
|
+
|
|
67
|
+
Args:
|
|
68
|
+
lint_result (Dict[str, Any]): The lint result dictionary.
|
|
69
|
+
|
|
70
|
+
Returns:
|
|
71
|
+
str: A formatted string representation of the lint results.
|
|
72
|
+
"""
|
|
73
|
+
pass
|
|
74
|
+
|
|
75
|
+
def get_file_extension(self, file_path: str) -> str:
|
|
76
|
+
"""
|
|
77
|
+
Get the file extension from a file path.
|
|
78
|
+
|
|
79
|
+
Args:
|
|
80
|
+
file_path (str): Path to the file.
|
|
81
|
+
|
|
82
|
+
Returns:
|
|
83
|
+
str: The file extension (lowercase, with dot).
|
|
84
|
+
"""
|
|
85
|
+
_, ext = os.path.splitext(file_path)
|
|
86
|
+
return ext.lower()
|
|
87
|
+
|
|
88
|
+
def is_supported_file(self, file_path: str) -> bool:
|
|
89
|
+
"""
|
|
90
|
+
Check if a file is supported by this linter.
|
|
91
|
+
|
|
92
|
+
Args:
|
|
93
|
+
file_path (str): Path to the file.
|
|
94
|
+
|
|
95
|
+
Returns:
|
|
96
|
+
bool: True if the file is supported, False otherwise.
|
|
97
|
+
"""
|
|
98
|
+
return self.get_file_extension(file_path) in self.get_supported_extensions()
|
|
99
|
+
|
|
100
|
+
@abstractmethod
|
|
101
|
+
def get_supported_extensions(self) -> List[str]:
|
|
102
|
+
"""
|
|
103
|
+
Get the list of file extensions supported by this linter.
|
|
104
|
+
|
|
105
|
+
Returns:
|
|
106
|
+
List[str]: List of supported file extensions (lowercase, with dot).
|
|
107
|
+
"""
|
|
108
|
+
pass
|