complexipy 4.0.2__tar.gz → 4.1.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.
- {complexipy-4.0.2 → complexipy-4.1.0}/Cargo.lock +1 -1
- {complexipy-4.0.2 → complexipy-4.1.0}/Cargo.toml +1 -1
- {complexipy-4.0.2 → complexipy-4.1.0}/PKG-INFO +2 -1
- {complexipy-4.0.2 → complexipy-4.1.0}/README.md +1 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/complexipy/main.py +20 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/docs/index.md +1 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/src/cognitive_complexity/mod.rs +2 -1
- {complexipy-4.0.2 → complexipy-4.1.0}/vscode/complexipy/CHANGELOG.md +11 -1
- {complexipy-4.0.2 → complexipy-4.1.0}/vscode/complexipy/README.md +9 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/vscode/complexipy/package.json +2 -2
- {complexipy-4.0.2 → complexipy-4.1.0}/.pre-commit-config.yaml +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/LICENSE +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/build-wasm.sh +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/complexipy/__init__.py +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/complexipy/_complexipy.pyi +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/complexipy/api.py +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/complexipy/error_handlers.py +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/complexipy/py.typed +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/complexipy/types.py +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/complexipy/utils.py +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/complexipy.toml +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/docs/img/complexipy_icon.svg +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/mkdocs.yml +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/pyproject.toml +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/serve-web-version.sh +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/src/classes/mod.rs +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/src/cognitive_complexity/utils.rs +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/src/lib.rs +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/src/wasm.rs +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/uv.lock +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/vscode/complexipy/.vscode-test.mjs +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/vscode/complexipy/.vscodeignore +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/vscode/complexipy/LICENSE +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/vscode/complexipy/eslint.config.mjs +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/vscode/complexipy/extension.js +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/vscode/complexipy/img/complexipy.png +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/vscode/complexipy/img/complexipy_icon.png +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/vscode/complexipy/img/complexipy_icon.svg +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/vscode/complexipy/jsconfig.json +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/vscode/complexipy/package-lock.json +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/vscode/complexipy/test/extension.test.js +0 -0
- {complexipy-4.0.2 → complexipy-4.1.0}/vscode/complexipy/test/statusbar.test.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: complexipy
|
|
3
|
-
Version: 4.0
|
|
3
|
+
Version: 4.1.0
|
|
4
4
|
Classifier: Development Status :: 5 - Production/Stable
|
|
5
5
|
Classifier: Environment :: Console
|
|
6
6
|
Classifier: Intended Audience :: Developers
|
|
@@ -200,6 +200,7 @@ json = true
|
|
|
200
200
|
| `--sort <asc\|desc\|name>` | Sort results | `asc` |
|
|
201
201
|
| `--quiet` | Suppress output | `false` |
|
|
202
202
|
| `--ignore-complexity` | Don't exit with error on threshold breach | `false` |
|
|
203
|
+
| `--version` | Show installed complexipy version and exit | - |
|
|
203
204
|
|
|
204
205
|
## API Reference
|
|
205
206
|
|
|
@@ -168,6 +168,7 @@ json = true
|
|
|
168
168
|
| `--sort <asc\|desc\|name>` | Sort results | `asc` |
|
|
169
169
|
| `--quiet` | Suppress output | `false` |
|
|
170
170
|
| `--ignore-complexity` | Don't exit with error on threshold breach | `false` |
|
|
171
|
+
| `--version` | Show installed complexipy version and exit | - |
|
|
171
172
|
|
|
172
173
|
## API Reference
|
|
173
174
|
|
|
@@ -25,6 +25,10 @@ from typing import (
|
|
|
25
25
|
)
|
|
26
26
|
import time
|
|
27
27
|
import typer
|
|
28
|
+
from importlib.metadata import (
|
|
29
|
+
PackageNotFoundError,
|
|
30
|
+
version as pkg_version,
|
|
31
|
+
)
|
|
28
32
|
|
|
29
33
|
app = typer.Typer(name="complexipy")
|
|
30
34
|
console = Console()
|
|
@@ -32,6 +36,15 @@ INVOCATION_PATH = os.getcwd()
|
|
|
32
36
|
TOML_CONFIG = get_complexipy_toml_config(INVOCATION_PATH)
|
|
33
37
|
|
|
34
38
|
|
|
39
|
+
def _version_callback(value: bool):
|
|
40
|
+
if value:
|
|
41
|
+
try:
|
|
42
|
+
console.print(pkg_version("complexipy"))
|
|
43
|
+
except PackageNotFoundError:
|
|
44
|
+
console.print("Unknown version")
|
|
45
|
+
raise typer.Exit()
|
|
46
|
+
|
|
47
|
+
|
|
35
48
|
@app.command()
|
|
36
49
|
def main(
|
|
37
50
|
paths: Optional[List[str]] = typer.Argument(
|
|
@@ -80,6 +93,13 @@ def main(
|
|
|
80
93
|
"-j",
|
|
81
94
|
help="Output the results to a JSON file.",
|
|
82
95
|
),
|
|
96
|
+
version: bool = typer.Option( # type: ignore[assignment]
|
|
97
|
+
False,
|
|
98
|
+
"--version",
|
|
99
|
+
help="Show the complexipy version and exit.",
|
|
100
|
+
callback=_version_callback,
|
|
101
|
+
is_eager=True,
|
|
102
|
+
),
|
|
83
103
|
):
|
|
84
104
|
(
|
|
85
105
|
paths,
|
|
@@ -168,6 +168,7 @@ json = true
|
|
|
168
168
|
| `--sort <asc\|desc\|name>` | Sort results by complexity or name | `asc` |
|
|
169
169
|
| `--quiet` | Suppress terminal output | `false` |
|
|
170
170
|
| `--ignore-complexity` | Don't exit with error on threshold breach | `false` |
|
|
171
|
+
| `--version` | Show installed complexipy version and exit | - |
|
|
171
172
|
|
|
172
173
|
### Examples
|
|
173
174
|
|
|
@@ -2,7 +2,7 @@ pub mod utils;
|
|
|
2
2
|
|
|
3
3
|
#[cfg(any(feature = "python", feature = "wasm"))]
|
|
4
4
|
mod shared_deps {
|
|
5
|
-
pub use super::utils::{count_bool_ops, get_line_number,
|
|
5
|
+
pub use super::utils::{count_bool_ops, get_line_number, is_decorator};
|
|
6
6
|
pub use crate::classes::{CodeComplexity, FileComplexity, FunctionComplexity, LineComplexity};
|
|
7
7
|
pub use ruff_python_ast::{self as ast, Stmt};
|
|
8
8
|
}
|
|
@@ -12,6 +12,7 @@ use shared_deps::*;
|
|
|
12
12
|
|
|
13
13
|
#[cfg(feature = "python")]
|
|
14
14
|
mod python_deps {
|
|
15
|
+
pub use super::utils::get_repo_name;
|
|
15
16
|
pub use ignore::Walk;
|
|
16
17
|
pub use indicatif::ProgressBar;
|
|
17
18
|
pub use indicatif::ProgressStyle;
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## [0.2.0] - 2025-08-22
|
|
4
|
+
|
|
5
|
+
### Breaking Changes
|
|
6
|
+
|
|
7
|
+
- Updated the bool operators complexity algorithm that counts the complexity based on the bool operators
|
|
8
|
+
|
|
9
|
+
### Improved
|
|
10
|
+
|
|
11
|
+
- Performance
|
|
12
|
+
|
|
3
13
|
## [0.1.0] - 2025-07-09
|
|
4
14
|
|
|
5
15
|
### Added
|
|
@@ -91,4 +101,4 @@
|
|
|
91
101
|
- Support for Python files
|
|
92
102
|
- Complexity thresholds:
|
|
93
103
|
- Function complexity: Low (≤ 15), High (> 15)
|
|
94
|
-
- Line complexity: Low (≤ 5), High (> 5)
|
|
104
|
+
- Line complexity: Low (≤ 5), High (> 5)
|
|
@@ -67,6 +67,15 @@ You can trigger a manual analysis by:
|
|
|
67
67
|
|
|
68
68
|
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
69
69
|
|
|
70
|
+
## Changelog
|
|
71
|
+
|
|
72
|
+
### 0.2.0 — 2025-08-22
|
|
73
|
+
|
|
74
|
+
- Breaking: Updated boolean operators complexity algorithm to count complexity based on boolean operators
|
|
75
|
+
- Improved: Performance improvements
|
|
76
|
+
|
|
77
|
+
For a full history, see `CHANGELOG.md`.
|
|
78
|
+
|
|
70
79
|
## License
|
|
71
80
|
|
|
72
81
|
This extension is licensed under the MIT License - see the LICENSE file for details.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "complexipy",
|
|
3
3
|
"displayName": "complexipy",
|
|
4
4
|
"description": "Real-time cognitive complexity analyzer for Python code with visual indicators, status bar integration, and detailed hover information for function and line-level complexity",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.2.0",
|
|
6
6
|
"icon": "img/complexipy.png",
|
|
7
7
|
"publisher": "rohaquinlop",
|
|
8
8
|
"repository": {
|
|
@@ -39,4 +39,4 @@
|
|
|
39
39
|
"@types/node": "16.x",
|
|
40
40
|
"eslint": "^8.56.0"
|
|
41
41
|
}
|
|
42
|
-
}
|
|
42
|
+
}
|
|
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
|