CLASPLint 0.2.0__tar.gz → 0.4.0__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 (38) hide show
  1. CLASPLint-0.4.0/CLASPLint/__init__.py +78 -0
  2. {CLASPLint-0.2.0 → CLASPLint-0.4.0}/CLASPLint/__main__.py +68 -21
  3. CLASPLint-0.4.0/CLASPLint/comment_checker.py +820 -0
  4. CLASPLint-0.4.0/CLASPLint/dict_key_checker.py +264 -0
  5. CLASPLint-0.4.0/CLASPLint/docstring_checker.py +927 -0
  6. CLASPLint-0.4.0/CLASPLint/function_checker.py +317 -0
  7. CLASPLint-0.4.0/CLASPLint/log_checker.py +515 -0
  8. {CLASPLint-0.2.0 → CLASPLint-0.4.0}/CLASPLint/naming_utils.py +193 -75
  9. CLASPLint-0.4.0/CLASPLint/reporter.py +393 -0
  10. CLASPLint-0.4.0/CLASPLint/runner.py +285 -0
  11. CLASPLint-0.4.0/CLASPLint/variable_checker.py +626 -0
  12. CLASPLint-0.4.0/CLASPLint.egg-info/PKG-INFO +338 -0
  13. CLASPLint-0.4.0/LICENSE +688 -0
  14. CLASPLint-0.4.0/MANIFEST.in +3 -0
  15. CLASPLint-0.4.0/PKG-INFO +338 -0
  16. CLASPLint-0.4.0/README.md +309 -0
  17. {CLASPLint-0.2.0 → CLASPLint-0.4.0}/pyproject.toml +2 -2
  18. {CLASPLint-0.2.0 → CLASPLint-0.4.0}/setup.py +4 -3
  19. CLASPLint-0.2.0/CLASPLint/__init__.py +0 -34
  20. CLASPLint-0.2.0/CLASPLint/comment_checker.py +0 -356
  21. CLASPLint-0.2.0/CLASPLint/dict_key_checker.py +0 -186
  22. CLASPLint-0.2.0/CLASPLint/docstring_checker.py +0 -436
  23. CLASPLint-0.2.0/CLASPLint/function_checker.py +0 -265
  24. CLASPLint-0.2.0/CLASPLint/log_checker.py +0 -326
  25. CLASPLint-0.2.0/CLASPLint/reporter.py +0 -186
  26. CLASPLint-0.2.0/CLASPLint/runner.py +0 -212
  27. CLASPLint-0.2.0/CLASPLint/variable_checker.py +0 -339
  28. CLASPLint-0.2.0/CLASPLint.egg-info/PKG-INFO +0 -241
  29. CLASPLint-0.2.0/LICENSE +0 -16
  30. CLASPLint-0.2.0/MANIFEST.in +0 -1
  31. CLASPLint-0.2.0/PKG-INFO +0 -241
  32. CLASPLint-0.2.0/README.md +0 -213
  33. {CLASPLint-0.2.0 → CLASPLint-0.4.0}/CLASPLint.egg-info/SOURCES.txt +0 -0
  34. {CLASPLint-0.2.0 → CLASPLint-0.4.0}/CLASPLint.egg-info/dependency_links.txt +0 -0
  35. {CLASPLint-0.2.0 → CLASPLint-0.4.0}/CLASPLint.egg-info/entry_points.txt +0 -0
  36. {CLASPLint-0.2.0 → CLASPLint-0.4.0}/CLASPLint.egg-info/top_level.txt +0 -0
  37. {CLASPLint-0.2.0 → CLASPLint-0.4.0}/CLASPLint.egg-info/zip-safe +0 -0
  38. {CLASPLint-0.2.0 → CLASPLint-0.4.0}/setup.cfg +0 -0
@@ -0,0 +1,78 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ THIS FILE IS CORE PART OF CLASPLINT BY MATT BELFAST BROWN.
4
+
5
+ ===============================================================================
6
+
7
+ MODULE : CLASPLint.__init__
8
+
9
+ TYPE : Python Script
10
+
11
+ DESCRIPTION :
12
+ Package entry point and public API surface. Exposes the runner and reporter
13
+ modules as the primary public interface for programmatic use of the CLASP
14
+ 3.2 / PEP 2606 static analysis engine.
15
+
16
+ AUTHOR : Matt Belfast Brown
17
+
18
+ CONTACT : thedayofthedo@gmail.com
19
+
20
+ MAINTAINER :
21
+ Matt Belfast Brown (thedayofthedo@gmail.com)
22
+
23
+
24
+ PROJECT CREATE DATE : 2026-06-17
25
+
26
+ PROJECT VERSION DATE : 2026-07-05
27
+
28
+ PROJECT VERSION : 0.4.0
29
+
30
+
31
+ FILE CREATE DATE : 2026-06-17
32
+
33
+ FILE VERSION DATE : 2026-07-05
34
+
35
+ FILE VERSION : 0.4.0
36
+
37
+
38
+ STATUS : Stable
39
+
40
+ PYTHON : >=3.8
41
+
42
+ LICENSE : GPL-3.0-only
43
+
44
+ SPDX ID : GPL-3.0-only
45
+
46
+
47
+ USAGE :
48
+ import CLASPLint
49
+
50
+ report = CLASPLint.runner.run(["path/to/code/"])
51
+ print(report.summary())
52
+
53
+ ===============================================================================
54
+
55
+ THIS PROGRAM IS LICENSED UNDER GPL-3.0-only LICENSE.
56
+ YOU SHOULD HAVE RECEIVED A COPY OF GPL-3.0-only LICENSE.
57
+
58
+ Copyright (C) 2026 Matt Belfast Brown.
59
+
60
+ Sort License:
61
+
62
+ CLASPLint is free software: you can redistribute it and/or modify
63
+ it under the terms of the GNU General Public License as published by
64
+ the Free Software Foundation, version 3 of the License.
65
+
66
+ CLASPLint is distributed in the hope that it will be useful,
67
+ but WITHOUT ANY WARRANTY; without even the implied warranty
68
+ of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
69
+ GNU General Public License for more details.
70
+
71
+ You should have received a copy of the GNU General Public License
72
+ along with CLASPLint. If not, see <https://www.gnu.org/licenses/>.
73
+ """
74
+
75
+ # Define the package version string.
76
+ __version__ = "0.4.0"
77
+ # Expose the runner and reporter modules as the public API.
78
+ __all__ = ["runner", "reporter"]
@@ -1,33 +1,80 @@
1
+ # -*- coding: utf-8 -*-
1
2
  """
2
- THIS FILE IS PART OF CLASPLINT BY MATT BELFAST BROWN
3
- CLASPLint.__main__ — command-line entry point for the CLASP 3.0 static analysis tool.
3
+ THIS FILE IS CORE PART OF CLASPLINT BY MATT BELFAST BROWN.
4
4
 
5
- Author: Matt Belfast Brown
6
- Create Date: 2026-06-17
7
- Version Date: 2026-06-21
8
- Version: 0.2.0
5
+ ===============================================================================
9
6
 
10
- THIS PROGRAM IS LICENSED UNDER GPL-3.0
11
- YOU SHOULD HAVE RECEIVED A COPY OF GPL-3.0 LICENSE.
7
+ MODULE : CLASPLint.__main__
12
8
 
13
- Copyright (C) 2026 Matt Belfast Brown
9
+ TYPE : Python Script
14
10
 
15
- This program is free software: you can redistribute it and/or modify
16
- it under the terms of the GNU General Public License as published by
17
- the Free Software Foundation, version 3 of the License.
11
+ DESCRIPTION :
12
+ Command-line entry point for the CLASP 3.2 / PEP 2606 static analysis tool.
18
13
 
19
- This program is distributed in the hope that it will be useful,
20
- but WITHOUT ANY WARRANTY; without even the implied warranty
21
- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
- GNU General Public License for more details.
14
+ AUTHOR : Matt Belfast Brown
23
15
 
24
- You should have received a copy of the GNU General Public License
25
- along with this program. If not, see <http://www.gnu.org/licenses/>.
16
+ CONTACT : thedayofthedo@gmail.com
17
+
18
+ MAINTAINER :
19
+ Matt Belfast Brown (thedayofthedo@gmail.com)
20
+
21
+
22
+ PROJECT CREATE DATE : 2026-06-17
23
+
24
+ PROJECT VERSION DATE : 2026-07-05
25
+
26
+ PROJECT VERSION : 0.4.0
27
+
28
+
29
+ FILE CREATE DATE : 2026-06-17
30
+
31
+ FILE VERSION DATE : 2026-07-05
32
+
33
+ FILE VERSION : 0.4.0
34
+
35
+
36
+ STATUS : Stable
37
+
38
+ PYTHON : >=3.8
39
+
40
+ LICENSE : GPL-3.0-only
41
+
42
+ SPDX ID : GPL-3.0-only
43
+
44
+
45
+ USAGE :
46
+ CLASPLint path/to/file.py
47
+
48
+ CLASPLint --quiet src/
49
+
50
+ CLASPLint --category variable src/
51
+
52
+ ===============================================================================
53
+
54
+ THIS PROGRAM IS LICENSED UNDER GPL-3.0-only LICENSE.
55
+ YOU SHOULD HAVE RECEIVED A COPY OF GPL-3.0-only LICENSE.
56
+
57
+ Copyright (C) 2026 Matt Belfast Brown.
58
+
59
+ Sort License:
60
+
61
+ CLASPLint is free software: you can redistribute it and/or modify
62
+ it under the terms of the GNU General Public License as published by
63
+ the Free Software Foundation, version 3 of the License.
64
+
65
+ CLASPLint is distributed in the hope that it will be useful,
66
+ but WITHOUT ANY WARRANTY; without even the implied warranty
67
+ of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
68
+ GNU General Public License for more details.
69
+
70
+ You should have received a copy of the GNU General Public License
71
+ along with CLASPLint. If not, see <https://www.gnu.org/licenses/>.
26
72
  """
27
73
 
28
74
  import argparse
29
75
  import sys
30
76
  import os
77
+ from typing import Optional, Sequence
31
78
 
32
79
  from .runner import run
33
80
  from . import __version__
@@ -40,7 +87,7 @@ def _init_build_parser_function_() -> argparse.ArgumentParser:
40
87
  # Set the program name displayed in help text.
41
88
  prog="CLASPLint",
42
89
  # Provide a description of what the tool does.
43
- description="CLASP 3.0 / PEP 2606 static analysis tool. "
90
+ description="CLASP 3.2 / PEP 2606 static analysis tool. "
44
91
  # Continue the description across multiple lines for readability.
45
92
  "Checks variable, dict key, function, class naming "
46
93
  # Complete the tool description with comment and log conventions.
@@ -51,7 +98,7 @@ def _init_build_parser_function_() -> argparse.ArgumentParser:
51
98
  parser_result.add_argument(
52
99
  # Accept zero or more path strings as positional arguments.
53
100
  "paths", nargs="*", default=["."],
54
- # Provide the help text for the paths argument.
101
+ # Provide the help text for the paths' argument.
55
102
  help="Python files or directories to check (default: current directory).",
56
103
  # Close the first add_argument call.
57
104
  )
@@ -93,7 +140,7 @@ def _init_build_parser_function_() -> argparse.ArgumentParser:
93
140
  return parser_result
94
141
 
95
142
 
96
- def main(argv: list = None) -> int:
143
+ def main(argv: Optional[Sequence[str]] = None) -> int:
97
144
  """Execute the CLASPLint analysis and return an exit code (0 = clean, 1 = violations)."""
98
145
  # Build and parse command-line arguments.
99
146
  parser = _init_build_parser_function_()