pyneat-cli 2.4.4__tar.gz → 2.4.5__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.
Files changed (79) hide show
  1. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/PKG-INFO +1 -1
  2. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/__init__.py +1 -1
  3. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/cli.py +20 -11
  4. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat_cli.egg-info/PKG-INFO +1 -1
  5. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyproject.toml +1 -1
  6. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/LICENSE +0 -0
  7. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/README.md +0 -0
  8. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/__main__.py +0 -0
  9. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/benchmark.py +0 -0
  10. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/config.py +0 -0
  11. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/core/__init__.py +0 -0
  12. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/core/atomic.py +0 -0
  13. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/core/engine.py +0 -0
  14. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/core/manifest.py +0 -0
  15. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/core/marker_cleanup.py +0 -0
  16. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/core/scope_guard.py +0 -0
  17. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/core/semantic_guard.py +0 -0
  18. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/core/type_shield.py +0 -0
  19. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/core/types.py +0 -0
  20. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/pre_commit.py +0 -0
  21. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/__init__.py +0 -0
  22. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/ai_bugs.py +0 -0
  23. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/base.py +0 -0
  24. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/comments.py +0 -0
  25. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/conservative.py +0 -0
  26. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/dataclass.py +0 -0
  27. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/deadcode.py +0 -0
  28. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/debug.py +0 -0
  29. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/destructive.py +0 -0
  30. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/duplication.py +0 -0
  31. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/fstring.py +0 -0
  32. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/imports.py +0 -0
  33. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/init_protection.py +0 -0
  34. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/is_not_none.py +0 -0
  35. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/isolated.py +0 -0
  36. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/magic_numbers.py +0 -0
  37. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/match_case.py +0 -0
  38. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/naming.py +0 -0
  39. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/performance.py +0 -0
  40. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/quality.py +0 -0
  41. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/range_len_pattern.py +0 -0
  42. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/redundant.py +0 -0
  43. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/refactoring.py +0 -0
  44. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/safe.py +0 -0
  45. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/security.py +0 -0
  46. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/security_pack/__init__.py +0 -0
  47. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/security_pack/critical.py +0 -0
  48. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/security_pack/high.py +0 -0
  49. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/security_pack/info.py +0 -0
  50. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/security_pack/low.py +0 -0
  51. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/security_pack/medium.py +0 -0
  52. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/security_registry.py +0 -0
  53. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/typing.py +0 -0
  54. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/rules/unused.py +0 -0
  55. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/scanner/rust_scanner.py +0 -0
  56. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/tools/__init__.py +0 -0
  57. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/tools/github_fuzz/__init__.py +0 -0
  58. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/tools/github_fuzz/__main__.py +0 -0
  59. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/tools/github_fuzz/debug_logger.py +0 -0
  60. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/tools/github_fuzz/fuzz_runner.py +0 -0
  61. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/tools/github_fuzz/github_client.py +0 -0
  62. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/tools/security/advisory_db.py +0 -0
  63. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/tools/security/dependency_scanner.py +0 -0
  64. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat/utils/naming.py +0 -0
  65. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat_cli.egg-info/SOURCES.txt +0 -0
  66. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat_cli.egg-info/dependency_links.txt +0 -0
  67. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat_cli.egg-info/entry_points.txt +0 -0
  68. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat_cli.egg-info/requires.txt +0 -0
  69. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/pyneat_cli.egg-info/top_level.txt +0 -0
  70. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/setup.cfg +0 -0
  71. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/setup.py +0 -0
  72. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/tests/test_engine.py +0 -0
  73. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/tests/test_fuzz.py +0 -0
  74. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/tests/test_fuzz_github.py +0 -0
  75. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/tests/test_integration.py +0 -0
  76. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/tests/test_layers.py +0 -0
  77. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/tests/test_rust_scanner.py +0 -0
  78. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/tests/test_semantic_integrity.py +0 -0
  79. {pyneat_cli-2.4.4 → pyneat_cli-2.4.5}/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.4
3
+ Version: 2.4.5
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
@@ -85,7 +85,7 @@ from .rules.ai_bugs import AIBugRule
85
85
  from .rules.duplication import CodeDuplicationRule
86
86
  from .rules.naming import NamingInconsistencyRule
87
87
 
88
- __version__ = "2.4.4"
88
+ __version__ = "2.4.5"
89
89
 
90
90
  __all__ = [
91
91
  # Core
@@ -1528,31 +1528,40 @@ def _get_menu_suggestions(last_command: str, context: str) -> Dict[str, tuple]:
1528
1528
 
1529
1529
  def _handle_menu_choice(choice: str, suggestions: Dict[str, tuple], ctx: click.Context) -> None:
1530
1530
  """Handle user's menu choice - run the command directly."""
1531
- # Command map: key -> (feature_name, command_name)
1531
+ # Command map: key -> command_name
1532
1532
  choice_map = {
1533
- 'A': ('check', 'check'),
1534
- 'B': ('explain', 'explain'),
1535
- 'C': ('clean', 'clean'),
1536
- 'D': ('report', 'report'),
1533
+ 'A': 'check',
1534
+ 'B': 'explain',
1535
+ 'C': 'clean',
1536
+ 'D': 'report',
1537
1537
  }
1538
1538
 
1539
1539
  if choice in choice_map:
1540
- feature, cmd_name = choice_map[choice]
1540
+ cmd_name = choice_map[choice]
1541
1541
  click.echo("")
1542
1542
  click.echo(f" Running: {click.style('pyneat ' + cmd_name + ' --help', fg='cyan', bold=True)}")
1543
1543
  click.echo("")
1544
1544
 
1545
- # Lấy subcommand từ CLI group invoke
1545
+ # Lấy CLI group từ parent context
1546
1546
  try:
1547
- sub_cmd = ctx.command.commands.get(cmd_name)
1547
+ cli_ctx = ctx.parent
1548
+ if cli_ctx is None:
1549
+ cli_ctx = click.get_current_context()
1550
+
1551
+ sub_cmd = cli_ctx.command.commands.get(cmd_name)
1548
1552
  if sub_cmd:
1549
- ctx.invoke(sub_cmd, ['--help'])
1553
+ # Tạo context mới với --help
1554
+ sub_ctx = sub_cmd.make_context(cmd_name, ['--help'])
1555
+ sub_cmd.invoke(sub_ctx)
1550
1556
  else:
1551
1557
  click.echo(f" {click.style('[!]', fg='red')} Command '{cmd_name}' not found")
1552
- except SystemExit:
1558
+ except SystemExit as e:
1559
+ # Help command thường exit(0) - không hiển thị lỗi
1553
1560
  pass
1554
1561
  except Exception as e:
1555
- click.echo(f" {click.style('[!]', fg='red')} Error: {e}")
1562
+ # Chỉ hiển thị lỗi nếu có message thực sự
1563
+ if str(e) and str(e) != '0':
1564
+ click.echo(f" {click.style('[!]', fg='red')} Error: {e}")
1556
1565
  else:
1557
1566
  click.echo("")
1558
1567
  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.4
3
+ Version: 2.4.5
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.4"
7
+ version = "2.4.5"
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