Commit 3d5bbb8
refactor(codebase): resolve all 134 flake8 violations and reduce cyclomatic complexity
Eliminated all flake8 linting violations across the codebase:
* W293 (87 violations): Removed trailing whitespace from blank lines in registry_loader.py, provider_manager.py, explanations.py, and utils.py
* W391 (13 violations): Removed trailing blank lines at end of file in provider implementations and strategy files
* F401 (4 violations): Removed unused datetime imports from registry_loader.py and builtins imports from utils.py and suggestions.py
* E302 (4 violations): Added missing blank lines before top-level class definitions in strategy.py, enums, base.py, and utils.py
* E261 (6 violations): Fixed inline comment spacing (single→double space before #) in ollama_openai.py and explanations.py
* E305 (1 violation): Added blank line between _query_model method and module-level comment in explanations.py
* E303 (1 violation): Removed extra blank line between methods in provider_manager.py
* E501 (1 violation): Broke long function signature in ai_interface.py._query_parallel() across multiple lines
* E251 (1 violation): Removed spaces around keyword parameter equals in explanations.py
* F841 (1 violation): Removed unused 'link' variable in provider_manager.py._init_providers()
Refactored 8 high-complexity functions to reduce cyclomatic complexity:
* AIModelInterface.query_model (12→6): Extracted _route_vendor_query() for vendor routing logic
* AIModelInterface.get_model_weights (12→4): Extracted _calculate_base_weight() helper
* AIModelInterface._build_messages (11→4): Extracted 5 vendor-specific message builders
* ProviderManager._init_providers (11→7): Extracted _init_provider_variants() for variant loop
* RegistryLoader._validate_registry (12→5): Extracted validation helper methods
* SmartPlotGenerator._create_scatter (14→8): Extracted dimension and title helpers
* plotgen (12→6): Extracted _extract_and_override_variables() to eliminate duplication
* VisualizationRecommender._apply_ensemble_scoring (13→4): Extracted recommendation collection helpers1 parent 6c2c2f0 commit 3d5bbb8
24 files changed
Lines changed: 1114 additions & 1651 deletions
File tree
- plotsense
- core
- enums
- providers
- strategies
- explanations
- plot_generator
- visual_suggestion
- test_logs
Binary file not shown.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
| 26 | + | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
0 commit comments