|
13 | 13 | # The exact template with comments for the --init command |
14 | 14 | INIT_CONFIG_CONTENT = """{ |
15 | 15 | // List of templates to apply (keeping default as is always recommended) |
16 | | - // Add more templates in the list |
17 | | - // existing templates can be seen here `https://github.com/assignment-sets/annotator-cli` |
| 16 | + // Add more templates in the list |
| 17 | + // existing templates can be seen here `https://github.com/assignment-sets/annotator-cli` |
18 | 18 | "templates": ["default"], |
19 | | - |
| 19 | +
|
20 | 20 | // Behavior settings |
21 | 21 | "settings": { |
22 | 22 | "max_recursive_depth": 10, // How deep to recurse into folders |
23 | 23 | "max_num_of_files": 1000, // Maximum files to process |
24 | 24 | "max_file_size_kb": 512 // Skip files larger than this |
25 | 25 | }, |
26 | | - |
| 26 | +
|
27 | 27 | // Override comment styles for specific extensions |
28 | 28 | // Example: ".kt": "//", ".scala": "//" |
29 | 29 | "comment_styles": {}, |
30 | | - |
| 30 | +
|
31 | 31 | // Additional file extensions to exclude (beyond defaults) |
32 | 32 | // Example: [".txt", ".log"] |
33 | | - // keeping existing items is prefered |
| 33 | + // keeping existing items is prefered |
34 | 34 | "exclude_extensions": [".log", ".cache"], |
35 | | - |
| 35 | +
|
36 | 36 | // Additional directories to exclude (supports nested paths) |
37 | 37 | // Example: ["temp", "cache", "src/generated/proto"] |
38 | 38 | // keeping existing items is prefered |
39 | 39 | "exclude_dirs": ["node_modules", ".venv", "__pycache__", "dist", "build", "target", "bin", ".git"], |
40 | | - |
| 40 | +
|
41 | 41 | // Additional specific file `names` to exclude [no support for nested paths] |
42 | 42 | // Example: [".env.local", "config.json"] |
43 | 43 | // keeping existing items is prefered |
@@ -204,7 +204,7 @@ def get_config(root: str) -> Dict[str, Any]: |
204 | 204 | final_config = merge_configs(final_config, user_overrides) |
205 | 205 |
|
206 | 206 | # Final summary |
207 | | - print(f"\n[CONFIG SUMMARY]") |
| 207 | + print("\n[CONFIG SUMMARY]") |
208 | 208 | print(f" Comment styles: {len(final_config.get('comment_styles', {}))}") |
209 | 209 | print(f" Excluded extensions: {len(final_config.get('exclude_extensions', []))}") |
210 | 210 | print(f" Excluded files: {len(final_config.get('exclude_files', []))}") |
@@ -254,11 +254,11 @@ def run_init(root: str) -> None: |
254 | 254 | try: |
255 | 255 | with open(gitignore_path, "w", encoding="utf-8") as f: |
256 | 256 | f.write("# Annotator exclusions\nnode_modules/\n.DS_Store\n") |
257 | | - print(f"[INIT] Created .gitignore") |
| 257 | + print("[INIT] Created .gitignore") |
258 | 258 | except Exception as e: |
259 | 259 | print(f"[ERROR] Failed to create .gitignore: {e}") |
260 | 260 | else: |
261 | | - print(f"[SKIP] .gitignore already exists.") |
| 261 | + print("[SKIP] .gitignore already exists.") |
262 | 262 |
|
263 | 263 |
|
264 | 264 | def main() -> None: |
|
0 commit comments