diff --git a/code_quality_analyzer.py b/code_quality_analyzer.py index f6bdf94c1de779ec7c5bee7e1f77dd2c8732629a..68b0e382fd92989ca5e267466dc5853a52235009 100644 --- a/code_quality_analyzer.py +++ b/code_quality_analyzer.py @@ -13,6 +13,7 @@ import json from pathlib import Path from collections import defaultdict, Counter import matplotlib.pyplot as plt +import numpy as np import seaborn as sns from typing import Dict, List, Tuple, Any import argparse @@ -77,10 +78,10 @@ class CodeQualityAnalyzer: """Run all code quality tools.""" tools = { 'ruff': ['ruff', 'check', str(self.src_path)], - 'flake8': ['flake8', str(self.src_path)], - 'mypy': ['mypy', str(self.src_path)], - 'pylint': ['pylint', str(self.src_path)], - 'isort': ['isort', '--check-only', '--diff', str(self.src_path)], + # 'flake8': ['flake8', str(self.src_path)], + # 'mypy': ['mypy', str(self.src_path)], + # 'pylint': ['pylint', str(self.src_path)], + # 'isort': ['isort', '--check-only', '--diff', str(self.src_path)], 'black': ['black', '--check', '--diff', str(self.src_path)] } @@ -305,13 +306,6 @@ def main(): args = parser.parse_args() - # Import numpy for matplotlib - try: - import numpy as np - except ImportError: - print("Error: numpy is required for plotting. Install it with: pip install numpy") - return - analyzer = CodeQualityAnalyzer(args.src_path) analyzer.run_analysis() diff --git a/code_quality_report.png b/code_quality_report.png new file mode 100644 index 0000000000000000000000000000000000000000..e080d2722fc5215bf16eb5e50fbd6a806a7d4873 Binary files /dev/null and b/code_quality_report.png differ diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..57e706d88d8d8a484ec12af4a30d23b21451bdd2 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,26 @@ +[tool.black] +line-length = 88 +skip-string-normalization = true + +[tool.isort] +profile = "black" +line_length = 88 +src_paths = "." +skip_gitignore = true + +[tool.mypy] +strict = true +strict_equality = true +no_implicit_optional = true +warn_return_any = true +warn_unused_configs = true +warn_redundant_casts = true +ignore_missing_imports = true +ignore_missing_imports_per_module = true +disallow_untyped_decorators = false +disallow_untyped_defs = true +disallow_incomplete_defs = true +disallow_subclassing_any = false +disallow_any_unimported = false +disallow_any_explicit = true +disallow_any_generics = true \ No newline at end of file