pyneat-cli 2.4.2__tar.gz → 2.4.3__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.
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/PKG-INFO +1 -1
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/__init__.py +1 -1
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/cli.py +23 -15
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat_cli.egg-info/PKG-INFO +1 -1
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyproject.toml +1 -1
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/LICENSE +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/README.md +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/__main__.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/benchmark.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/config.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/core/__init__.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/core/atomic.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/core/engine.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/core/manifest.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/core/marker_cleanup.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/core/scope_guard.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/core/semantic_guard.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/core/type_shield.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/core/types.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/pre_commit.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/__init__.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/ai_bugs.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/base.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/comments.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/conservative.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/dataclass.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/deadcode.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/debug.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/destructive.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/duplication.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/fstring.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/imports.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/init_protection.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/is_not_none.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/isolated.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/magic_numbers.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/match_case.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/naming.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/performance.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/quality.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/range_len_pattern.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/redundant.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/refactoring.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/safe.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/security.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/security_pack/__init__.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/security_pack/critical.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/security_pack/high.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/security_pack/info.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/security_pack/low.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/security_pack/medium.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/security_registry.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/typing.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/rules/unused.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/scanner/rust_scanner.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/tools/__init__.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/tools/github_fuzz/__init__.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/tools/github_fuzz/__main__.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/tools/github_fuzz/debug_logger.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/tools/github_fuzz/fuzz_runner.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/tools/github_fuzz/github_client.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/tools/security/advisory_db.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/tools/security/dependency_scanner.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat/utils/naming.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat_cli.egg-info/SOURCES.txt +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat_cli.egg-info/dependency_links.txt +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat_cli.egg-info/entry_points.txt +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat_cli.egg-info/requires.txt +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/pyneat_cli.egg-info/top_level.txt +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/setup.cfg +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/setup.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/tests/test_engine.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/tests/test_fuzz.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/tests/test_fuzz_github.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/tests/test_integration.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/tests/test_layers.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/tests/test_rust_scanner.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/tests/test_semantic_integrity.py +0 -0
- {pyneat_cli-2.4.2 → pyneat_cli-2.4.3}/tests/test_smoke.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyneat-cli
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.3
|
|
4
4
|
Summary: Neat Python AI Code Cleaner — removes AI-generated code artifacts, dead code, and security vulnerabilities
|
|
5
5
|
License: GNU AGPL-3.0-or-later
|
|
6
6
|
Keywords: ai,code-cleaner,python,linter,formatter,security,dead-code,refactoring,ast,auto-fix
|
|
@@ -375,7 +375,8 @@ def clean(input_file: str, output: str, in_place: bool, verbose: bool,
|
|
|
375
375
|
return 1
|
|
376
376
|
|
|
377
377
|
# Hiển thị menu gợi ý tính năng khác
|
|
378
|
-
|
|
378
|
+
ctx = click.get_current_context()
|
|
379
|
+
show_feature_menu("clean", f"{len(result.changes_made)} changes made", ctx)
|
|
379
380
|
|
|
380
381
|
return 0
|
|
381
382
|
|
|
@@ -1035,7 +1036,8 @@ def check(target, severity, cvss, output, format, fail_on, skip_deps, verbose, u
|
|
|
1035
1036
|
click.secho(f" [FAIL] Found {sev_label} issue(s) - exiting with code 1", fg="red", bold=True)
|
|
1036
1037
|
|
|
1037
1038
|
# Hiển thị menu gợi ý tính năng khác
|
|
1038
|
-
|
|
1039
|
+
ctx = click.get_current_context()
|
|
1040
|
+
show_feature_menu("check", f"{sum(summary.values()) - summary.get('dep', 0)} issues found", ctx)
|
|
1039
1041
|
|
|
1040
1042
|
return exit_code
|
|
1041
1043
|
|
|
@@ -1440,7 +1442,7 @@ def security_db(update, status, force):
|
|
|
1440
1442
|
# Interactive Feature Menu
|
|
1441
1443
|
# --------------------------------------------------------------------------
|
|
1442
1444
|
|
|
1443
|
-
def show_feature_menu(last_command: str = "", context: str = "") -> None:
|
|
1445
|
+
def show_feature_menu(last_command: str = "", context: str = "", ctx: click.Context = None) -> None:
|
|
1444
1446
|
"""Show interactive menu guiding users to other features.
|
|
1445
1447
|
|
|
1446
1448
|
Args:
|
|
@@ -1478,7 +1480,7 @@ def show_feature_menu(last_command: str = "", context: str = "") -> None:
|
|
|
1478
1480
|
return
|
|
1479
1481
|
|
|
1480
1482
|
# Xử lý lựa chọn
|
|
1481
|
-
_handle_menu_choice(choice, suggestions)
|
|
1483
|
+
_handle_menu_choice(choice, suggestions, ctx)
|
|
1482
1484
|
|
|
1483
1485
|
|
|
1484
1486
|
def _get_menu_suggestions(last_command: str, context: str) -> Dict[str, tuple]:
|
|
@@ -1524,23 +1526,29 @@ def _get_menu_suggestions(last_command: str, context: str) -> Dict[str, tuple]:
|
|
|
1524
1526
|
return {k: all_options[k] for k in ordered if k in all_options}
|
|
1525
1527
|
|
|
1526
1528
|
|
|
1527
|
-
def _handle_menu_choice(choice: str, suggestions: Dict[str, tuple]) -> None:
|
|
1528
|
-
"""Handle user's menu choice."""
|
|
1529
|
+
def _handle_menu_choice(choice: str, suggestions: Dict[str, tuple], ctx: click.Context) -> None:
|
|
1530
|
+
"""Handle user's menu choice - run the command directly."""
|
|
1531
|
+
# Command map: key -> (feature_name, command_args)
|
|
1529
1532
|
choice_map = {
|
|
1530
|
-
'A': ('check', '
|
|
1531
|
-
'B': ('explain', '
|
|
1532
|
-
'C': ('clean', '
|
|
1533
|
-
'D': ('report', '
|
|
1533
|
+
'A': ('check', ['check', '--help']),
|
|
1534
|
+
'B': ('explain', ['explain', '--help']),
|
|
1535
|
+
'C': ('clean', ['clean', '--help']),
|
|
1536
|
+
'D': ('report', ['report', '--help']),
|
|
1534
1537
|
}
|
|
1535
1538
|
|
|
1536
1539
|
if choice in choice_map:
|
|
1537
|
-
feature,
|
|
1540
|
+
feature, cmd_args = choice_map[choice]
|
|
1538
1541
|
click.echo("")
|
|
1539
|
-
click.echo(f"
|
|
1540
|
-
click.echo(f" {click.style(help_cmd, fg='cyan')}")
|
|
1542
|
+
click.echo(f" Running: {click.style('pyneat ' + ' '.join(cmd_args), fg='cyan', bold=True)}")
|
|
1541
1543
|
click.echo("")
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
+
|
|
1545
|
+
# Chạy command trực tiếp bằng cách invoke lại CLI
|
|
1546
|
+
try:
|
|
1547
|
+
ctx.invoke(cli, args=cmd_args)
|
|
1548
|
+
except SystemExit:
|
|
1549
|
+
pass
|
|
1550
|
+
except Exception as e:
|
|
1551
|
+
click.echo(f" {click.style('[!]', fg='red')} Error: {e}")
|
|
1544
1552
|
else:
|
|
1545
1553
|
click.echo("")
|
|
1546
1554
|
click.echo(f" {click.style('[!]', fg='yellow', bold=True)} Invalid option.")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyneat-cli
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.3
|
|
4
4
|
Summary: Neat Python AI Code Cleaner — removes AI-generated code artifacts, dead code, and security vulnerabilities
|
|
5
5
|
License: GNU AGPL-3.0-or-later
|
|
6
6
|
Keywords: ai,code-cleaner,python,linter,formatter,security,dead-code,refactoring,ast,auto-fix
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pyneat-cli"
|
|
7
|
-
version = "2.4.
|
|
7
|
+
version = "2.4.3"
|
|
8
8
|
description = "Neat Python AI Code Cleaner — removes AI-generated code artifacts, dead code, and security vulnerabilities"
|
|
9
9
|
license = {text = "GNU AGPL-3.0-or-later"}
|
|
10
10
|
readme = "README.md"
|
|
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
|