Avoid getters and setters: enable EO007 check#851
Conversation
WalkthroughThis change refactors the AST API by renaming methods and attributes for consistency, replaces deprecated method calls throughout the codebase and tests, removes the error code Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant AST
participant ASTNode
Client->>AST: ast.subtrees(ASTNodeType.CLASS_DECLARATION)
loop For each class_ast
Client->>AST: class_ast.with_fields_and_methods(fields, methods)
AST->>AST: Validate root is CLASS_DECLARATION
AST->>AST: Filter and construct new AST with allowed fields/methods
AST-->>Client: Filtered AST
end
Client->>AST: ast.proxy_nodes(ASTNodeType.METHOD_DECLARATION)
Client->>ASTNode: node.attr, node.children, etc.
Estimated code review effort3 (30–60 minutes) Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (65)
💤 Files with no reviewable changes (2)
✅ Files skipped from review due to trivial changes (3)
🚧 Files skipped from review as they are similar to previous changes (60)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
test/metrics/cc/test_all_types.py (1)
8-33: Consider if this refactoring belongs in this PRThis test refactoring consolidates the test logic into a single method, which is a valid improvement. However, it appears unrelated to the main PR objective of removing
get_prefixes from method names. Consider whether this change should be in a separate PR for better change tracking.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (64)
.flake8(1 hunks)aibolit/__main__.py(1 hunks)aibolit/ast_framework/ast.py(7 hunks)aibolit/ast_framework/ast_node.py(2 hunks)aibolit/ast_framework/computed_fields_registry.py(1 hunks)aibolit/ast_framework/java_class_decomposition.py(6 hunks)aibolit/ast_framework/scope.py(1 hunks)aibolit/ast_framework/scope_extractors.py(10 hunks)aibolit/metrics/NumberMethods/NumberMethods.py(1 hunks)aibolit/metrics/RFC/rfc.py(2 hunks)aibolit/metrics/cognitiveC/cognitive_c.py(7 hunks)aibolit/metrics/external_methods_called/external_methods_called.py(1 hunks)aibolit/metrics/fanout/FanOut.py(1 hunks)aibolit/metrics/local_methods_calls/local_methods_calls.py(1 hunks)aibolit/metrics/max_diameter/max_diameter.py(1 hunks)aibolit/metrics/ncss/ncss.py(1 hunks)aibolit/metrics/npath/main.py(1 hunks)aibolit/patterns/array_as_argument/array_as_argument.py(1 hunks)aibolit/patterns/assert_in_code/assert_in_code.py(1 hunks)aibolit/patterns/assign_null_finder/assign_null_finder.py(1 hunks)aibolit/patterns/classic_getter/classic_getter.py(1 hunks)aibolit/patterns/classic_setter/classic_setter.py(1 hunks)aibolit/patterns/empty_rethrow/empty_rethrow.py(2 hunks)aibolit/patterns/er_class/er_class.py(1 hunks)aibolit/patterns/force_type_casting_finder/force_type_casting_finder.py(1 hunks)aibolit/patterns/hybrid_constructor/hybrid_constructor.py(1 hunks)aibolit/patterns/if_return_if_detection/if_detection.py(1 hunks)aibolit/patterns/implements_multi/implements_multi.py(1 hunks)aibolit/patterns/incomplete_for/incomplete_for.py(1 hunks)aibolit/patterns/instanceof/instance_of.py(1 hunks)aibolit/patterns/joined_validation/joined_validation.py(1 hunks)aibolit/patterns/loop_outsider/loop_outsider.py(2 hunks)aibolit/patterns/many_primary_ctors/many_primary_ctors.py(2 hunks)aibolit/patterns/method_chaining/method_chaining.py(1 hunks)aibolit/patterns/method_siblings/method_siblings.py(1 hunks)aibolit/patterns/multiple_try/multiple_try.py(1 hunks)aibolit/patterns/multiple_while/multiple_while.py(1 hunks)aibolit/patterns/mutable_index/mutable_index.py(1 hunks)aibolit/patterns/nested_blocks/nested_blocks.py(1 hunks)aibolit/patterns/non_final_argument/non_final_argument.py(1 hunks)aibolit/patterns/non_final_attribute/non_final_attribute.py(1 hunks)aibolit/patterns/non_final_class/non_final_class.py(1 hunks)aibolit/patterns/null_check/null_check.py(1 hunks)aibolit/patterns/partially_synchronized_methods/partially_synchronized_methods.py(1 hunks)aibolit/patterns/private_static_method/private_static_method.py(1 hunks)aibolit/patterns/protected_method/protected_method.py(1 hunks)aibolit/patterns/public_static_method/public_static_method.py(1 hunks)aibolit/patterns/redundant_catch/redundant_catch.py(1 hunks)aibolit/patterns/return_null/return_null.py(1 hunks)aibolit/patterns/send_null/send_null.py(1 hunks)aibolit/patterns/string_concat/string_concat.py(1 hunks)aibolit/patterns/supermethod/supermethod.py(1 hunks)aibolit/patterns/var_decl_diff/var_decl_diff.py(1 hunks)aibolit/patterns/var_middle/var_middle.py(3 hunks)aibolit/patterns/var_siblings/var_siblings.py(2 hunks)aibolit/utils/java_parser.py(1 hunks)aibolit/utils/scope_status.py(1 hunks)scripts/04-find-patterns.py(2 hunks)test/ast_framework/test_ast.py(3 hunks)test/ast_framework/test_ast_node.py(1 hunks)test/ast_framework/test_java_class_decomposition.py(6 hunks)test/ast_framework/test_scope.py(2 hunks)test/metrics/cc/test_all_types.py(1 hunks)test/metrics/hv/test_all_types.py(0 hunks)
💤 Files with no reviewable changes (1)
- test/metrics/hv/test_all_types.py
🧰 Additional context used
🧠 Learnings (19)
aibolit/patterns/instanceof/instance_of.py (1)
Learnt from: SinbadTheSailor2005
PR: cqfn/aibolit#816
File: aibolit/patterns/loop_outsider/loop_outsider.py:0-0
Timestamp: 2025-06-08T11:50:22.673Z
Learning: In the aibolit codebase, ASTNodeType.ASSIGNMENT nodes have an attribute called `expressionl` (with 'l' suffix), not `expression`. This is confirmed in `aibolit/ast_framework/_auxiliary_data.py` and used consistently throughout existing patterns like mutable_index and many_primary_ctors.
aibolit/patterns/array_as_argument/array_as_argument.py (1)
Learnt from: SinbadTheSailor2005
PR: cqfn/aibolit#816
File: aibolit/patterns/loop_outsider/loop_outsider.py:0-0
Timestamp: 2025-06-08T11:50:22.673Z
Learning: In the aibolit codebase, ASTNodeType.ASSIGNMENT nodes have an attribute called `expressionl` (with 'l' suffix), not `expression`. This is confirmed in `aibolit/ast_framework/_auxiliary_data.py` and used consistently throughout existing patterns like mutable_index and many_primary_ctors.
aibolit/patterns/assign_null_finder/assign_null_finder.py (1)
Learnt from: SinbadTheSailor2005
PR: cqfn/aibolit#816
File: aibolit/patterns/loop_outsider/loop_outsider.py:0-0
Timestamp: 2025-06-08T11:50:22.673Z
Learning: In the aibolit codebase, ASTNodeType.ASSIGNMENT nodes have an attribute called `expressionl` (with 'l' suffix), not `expression`. This is confirmed in `aibolit/ast_framework/_auxiliary_data.py` and used consistently throughout existing patterns like mutable_index and many_primary_ctors.
aibolit/patterns/joined_validation/joined_validation.py (1)
Learnt from: SinbadTheSailor2005
PR: cqfn/aibolit#816
File: aibolit/patterns/loop_outsider/loop_outsider.py:0-0
Timestamp: 2025-06-08T11:50:22.673Z
Learning: In the aibolit codebase, ASTNodeType.ASSIGNMENT nodes have an attribute called `expressionl` (with 'l' suffix), not `expression`. This is confirmed in `aibolit/ast_framework/_auxiliary_data.py` and used consistently throughout existing patterns like mutable_index and many_primary_ctors.
aibolit/ast_framework/ast_node.py (1)
Learnt from: SinbadTheSailor2005
PR: cqfn/aibolit#816
File: aibolit/patterns/loop_outsider/loop_outsider.py:0-0
Timestamp: 2025-06-08T11:50:22.673Z
Learning: In the aibolit codebase, ASTNodeType.ASSIGNMENT nodes have an attribute called `expressionl` (with 'l' suffix), not `expression`. This is confirmed in `aibolit/ast_framework/_auxiliary_data.py` and used consistently throughout existing patterns like mutable_index and many_primary_ctors.
aibolit/patterns/non_final_argument/non_final_argument.py (1)
Learnt from: SinbadTheSailor2005
PR: cqfn/aibolit#816
File: aibolit/patterns/loop_outsider/loop_outsider.py:0-0
Timestamp: 2025-06-08T11:50:22.673Z
Learning: In the aibolit codebase, ASTNodeType.ASSIGNMENT nodes have an attribute called `expressionl` (with 'l' suffix), not `expression`. This is confirmed in `aibolit/ast_framework/_auxiliary_data.py` and used consistently throughout existing patterns like mutable_index and many_primary_ctors.
aibolit/patterns/return_null/return_null.py (1)
Learnt from: SinbadTheSailor2005
PR: cqfn/aibolit#816
File: aibolit/patterns/loop_outsider/loop_outsider.py:0-0
Timestamp: 2025-06-08T11:50:22.673Z
Learning: In the aibolit codebase, ASTNodeType.ASSIGNMENT nodes have an attribute called `expressionl` (with 'l' suffix), not `expression`. This is confirmed in `aibolit/ast_framework/_auxiliary_data.py` and used consistently throughout existing patterns like mutable_index and many_primary_ctors.
aibolit/patterns/loop_outsider/loop_outsider.py (1)
Learnt from: SinbadTheSailor2005
PR: cqfn/aibolit#816
File: aibolit/patterns/loop_outsider/loop_outsider.py:0-0
Timestamp: 2025-06-08T11:50:22.673Z
Learning: In the aibolit codebase, ASTNodeType.ASSIGNMENT nodes have an attribute called `expressionl` (with 'l' suffix), not `expression`. This is confirmed in `aibolit/ast_framework/_auxiliary_data.py` and used consistently throughout existing patterns like mutable_index and many_primary_ctors.
aibolit/patterns/mutable_index/mutable_index.py (1)
Learnt from: SinbadTheSailor2005
PR: cqfn/aibolit#816
File: aibolit/patterns/loop_outsider/loop_outsider.py:0-0
Timestamp: 2025-06-08T11:50:22.673Z
Learning: In the aibolit codebase, ASTNodeType.ASSIGNMENT nodes have an attribute called `expressionl` (with 'l' suffix), not `expression`. This is confirmed in `aibolit/ast_framework/_auxiliary_data.py` and used consistently throughout existing patterns like mutable_index and many_primary_ctors.
aibolit/patterns/string_concat/string_concat.py (1)
Learnt from: SinbadTheSailor2005
PR: cqfn/aibolit#816
File: aibolit/patterns/loop_outsider/loop_outsider.py:0-0
Timestamp: 2025-06-08T11:50:22.673Z
Learning: In the aibolit codebase, ASTNodeType.ASSIGNMENT nodes have an attribute called `expressionl` (with 'l' suffix), not `expression`. This is confirmed in `aibolit/ast_framework/_auxiliary_data.py` and used consistently throughout existing patterns like mutable_index and many_primary_ctors.
aibolit/patterns/send_null/send_null.py (1)
Learnt from: SinbadTheSailor2005
PR: cqfn/aibolit#816
File: aibolit/patterns/loop_outsider/loop_outsider.py:0-0
Timestamp: 2025-06-08T11:50:22.673Z
Learning: In the aibolit codebase, ASTNodeType.ASSIGNMENT nodes have an attribute called `expressionl` (with 'l' suffix), not `expression`. This is confirmed in `aibolit/ast_framework/_auxiliary_data.py` and used consistently throughout existing patterns like mutable_index and many_primary_ctors.
aibolit/ast_framework/scope_extractors.py (1)
Learnt from: SinbadTheSailor2005
PR: cqfn/aibolit#816
File: aibolit/patterns/loop_outsider/loop_outsider.py:0-0
Timestamp: 2025-06-08T11:50:22.673Z
Learning: In the aibolit codebase, ASTNodeType.ASSIGNMENT nodes have an attribute called `expressionl` (with 'l' suffix), not `expression`. This is confirmed in `aibolit/ast_framework/_auxiliary_data.py` and used consistently throughout existing patterns like mutable_index and many_primary_ctors.
aibolit/patterns/var_middle/var_middle.py (1)
Learnt from: SinbadTheSailor2005
PR: cqfn/aibolit#816
File: aibolit/patterns/loop_outsider/loop_outsider.py:0-0
Timestamp: 2025-06-08T11:50:22.673Z
Learning: In the aibolit codebase, ASTNodeType.ASSIGNMENT nodes have an attribute called `expressionl` (with 'l' suffix), not `expression`. This is confirmed in `aibolit/ast_framework/_auxiliary_data.py` and used consistently throughout existing patterns like mutable_index and many_primary_ctors.
aibolit/patterns/force_type_casting_finder/force_type_casting_finder.py (1)
Learnt from: SinbadTheSailor2005
PR: cqfn/aibolit#816
File: aibolit/patterns/loop_outsider/loop_outsider.py:0-0
Timestamp: 2025-06-08T11:50:22.673Z
Learning: In the aibolit codebase, ASTNodeType.ASSIGNMENT nodes have an attribute called `expressionl` (with 'l' suffix), not `expression`. This is confirmed in `aibolit/ast_framework/_auxiliary_data.py` and used consistently throughout existing patterns like mutable_index and many_primary_ctors.
aibolit/patterns/assert_in_code/assert_in_code.py (1)
Learnt from: SinbadTheSailor2005
PR: cqfn/aibolit#816
File: aibolit/patterns/loop_outsider/loop_outsider.py:0-0
Timestamp: 2025-06-08T11:50:22.673Z
Learning: In the aibolit codebase, ASTNodeType.ASSIGNMENT nodes have an attribute called `expressionl` (with 'l' suffix), not `expression`. This is confirmed in `aibolit/ast_framework/_auxiliary_data.py` and used consistently throughout existing patterns like mutable_index and many_primary_ctors.
aibolit/__main__.py (1)
Learnt from: SinbadTheSailor2005
PR: cqfn/aibolit#816
File: aibolit/patterns/loop_outsider/loop_outsider.py:0-0
Timestamp: 2025-06-08T11:50:22.673Z
Learning: In the aibolit codebase, ASTNodeType.ASSIGNMENT nodes have an attribute called `expressionl` (with 'l' suffix), not `expression`. This is confirmed in `aibolit/ast_framework/_auxiliary_data.py` and used consistently throughout existing patterns like mutable_index and many_primary_ctors.
aibolit/patterns/many_primary_ctors/many_primary_ctors.py (1)
Learnt from: SinbadTheSailor2005
PR: cqfn/aibolit#816
File: aibolit/patterns/loop_outsider/loop_outsider.py:0-0
Timestamp: 2025-06-08T11:50:22.673Z
Learning: In the aibolit codebase, ASTNodeType.ASSIGNMENT nodes have an attribute called `expressionl` (with 'l' suffix), not `expression`. This is confirmed in `aibolit/ast_framework/_auxiliary_data.py` and used consistently throughout existing patterns like mutable_index and many_primary_ctors.
aibolit/patterns/var_siblings/var_siblings.py (1)
Learnt from: SinbadTheSailor2005
PR: cqfn/aibolit#816
File: aibolit/patterns/loop_outsider/loop_outsider.py:0-0
Timestamp: 2025-06-08T11:50:22.673Z
Learning: In the aibolit codebase, ASTNodeType.ASSIGNMENT nodes have an attribute called `expressionl` (with 'l' suffix), not `expression`. This is confirmed in `aibolit/ast_framework/_auxiliary_data.py` and used consistently throughout existing patterns like mutable_index and many_primary_ctors.
aibolit/patterns/empty_rethrow/empty_rethrow.py (1)
Learnt from: SinbadTheSailor2005
PR: cqfn/aibolit#816
File: aibolit/patterns/loop_outsider/loop_outsider.py:0-0
Timestamp: 2025-06-08T11:50:22.673Z
Learning: In the aibolit codebase, ASTNodeType.ASSIGNMENT nodes have an attribute called `expressionl` (with 'l' suffix), not `expression`. This is confirmed in `aibolit/ast_framework/_auxiliary_data.py` and used consistently throughout existing patterns like mutable_index and many_primary_ctors.
🧬 Code Graph Analysis (43)
test/ast_framework/test_ast_node.py (1)
aibolit/ast_framework/ast.py (1)
root(65-66)
aibolit/patterns/instanceof/instance_of.py (3)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)aibolit/ast_framework/ast_node.py (1)
line(41-69)
aibolit/ast_framework/scope.py (1)
aibolit/ast_framework/ast.py (1)
root(65-66)
aibolit/patterns/assign_null_finder/assign_null_finder.py (2)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/patterns/method_chaining/method_chaining.py (2)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/patterns/joined_validation/joined_validation.py (2)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/metrics/local_methods_calls/local_methods_calls.py (2)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/ast_framework/ast_node.py (1)
aibolit/ast_framework/computed_fields_registry.py (1)
fields(36-39)
aibolit/patterns/classic_getter/classic_getter.py (2)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/patterns/non_final_argument/non_final_argument.py (1)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)
aibolit/patterns/var_decl_diff/var_decl_diff.py (2)
aibolit/ast_framework/ast.py (1)
subtrees(72-93)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/patterns/return_null/return_null.py (2)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/patterns/nested_blocks/nested_blocks.py (1)
aibolit/ast_framework/ast.py (2)
subtrees(72-93)root(65-66)
aibolit/patterns/implements_multi/implements_multi.py (2)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/patterns/protected_method/protected_method.py (2)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/patterns/redundant_catch/redundant_catch.py (2)
aibolit/ast_framework/ast.py (3)
subtree(95-98)proxy_nodes(176-179)AST(31-388)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/metrics/external_methods_called/external_methods_called.py (2)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/patterns/multiple_while/multiple_while.py (3)
aibolit/ast_framework/ast.py (2)
subtrees(72-93)root(65-66)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)aibolit/ast_framework/ast_node.py (1)
line(41-69)
aibolit/metrics/RFC/rfc.py (2)
aibolit/ast_framework/ast.py (5)
proxy_nodes(176-179)subtree(95-98)AST(31-388)root(65-66)subtrees(72-93)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/patterns/string_concat/string_concat.py (2)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/patterns/if_return_if_detection/if_detection.py (2)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
scripts/04-find-patterns.py (1)
aibolit/ast_framework/ast.py (2)
subtree(95-98)root(65-66)
aibolit/patterns/null_check/null_check.py (2)
aibolit/ast_framework/ast.py (2)
proxy_nodes(176-179)subtree(95-98)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/metrics/ncss/ncss.py (1)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)
aibolit/patterns/private_static_method/private_static_method.py (2)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/patterns/hybrid_constructor/hybrid_constructor.py (2)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/patterns/partially_synchronized_methods/partially_synchronized_methods.py (2)
aibolit/ast_framework/ast.py (3)
subtrees(72-93)root(65-66)proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/metrics/NumberMethods/NumberMethods.py (2)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/patterns/non_final_attribute/non_final_attribute.py (2)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/patterns/var_middle/var_middle.py (1)
aibolit/utils/scope_status.py (2)
ScopeStatusFlags(9-13)status(26-30)
aibolit/patterns/public_static_method/public_static_method.py (2)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/patterns/supermethod/supermethod.py (2)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/patterns/assert_in_code/assert_in_code.py (2)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
test/ast_framework/test_java_class_decomposition.py (2)
aibolit/ast_framework/ast.py (3)
root(65-66)subtree(95-98)proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/__main__.py (1)
aibolit/ast_framework/ast.py (2)
subtree(95-98)root(65-66)
aibolit/patterns/var_siblings/var_siblings.py (2)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/ast_framework/java_class_decomposition.py (4)
aibolit/ast_framework/ast.py (4)
root(65-66)subtree(95-98)proxy_nodes(176-179)AST(31-388)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)aibolit/ast_framework/scope.py (1)
parameters(55-56)aibolit/ast_framework/ast_node.py (1)
node_index(37-38)
aibolit/metrics/npath/main.py (2)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/patterns/classic_setter/classic_setter.py (2)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/patterns/empty_rethrow/empty_rethrow.py (2)
aibolit/ast_framework/ast.py (2)
subtree(95-98)proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/patterns/incomplete_for/incomplete_for.py (2)
aibolit/ast_framework/ast.py (1)
proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
aibolit/metrics/fanout/FanOut.py (2)
aibolit/ast_framework/ast.py (4)
subtrees(72-93)AST(31-388)root(65-66)proxy_nodes(176-179)aibolit/ast_framework/ast_node_type.py (1)
ASTNodeType(7-90)
test/ast_framework/test_scope.py (1)
aibolit/ast_framework/ast.py (2)
root(65-66)subtree(95-98)
🪛 GitHub Actions: pylint
aibolit/patterns/var_middle/var_middle.py
[warning] 22-22: Pylint W0212: Access to protected members _tree and _root of a client class (protected-access)
[warning] 24-24: Pylint W0212: Access to a protected member _tree of a client class (protected-access)
[warning] 26-26: Pylint W0212: Access to a protected member _tree of a client class (protected-access)
aibolit/ast_framework/java_class_decomposition.py
[warning] 195-195: Pylint W0212: Access to a protected member _tree of a client class (protected-access)
aibolit/metrics/cognitiveC/cognitive_c.py
[warning] 32-32: Pylint W0212: Access to a protected member _tree of a client class (protected-access)
[warning] 39-39: Pylint W0212: Access to a protected member _tree of a client class (protected-access)
[warning] 46-46: Pylint W0212: Access to a protected member _tree of a client class (protected-access)
[warning] 65-65: Pylint W0212: Access to a protected member _tree of a client class (protected-access)
[warning] 84-84: Pylint W0212: Access to a protected member _tree of a client class (protected-access)
[warning] 95-95: Pylint W0212: Access to a protected member _tree of a client class (protected-access)
[warning] 118-118: Pylint W0212: Access to a protected member _tree of a client class (protected-access)
[warning] 143-143: Pylint W0212: Access to a protected member _tree of a client class (protected-access)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: e2e-test
- GitHub Check: latexmk
- GitHub Check: make
🔇 Additional comments (97)
test/ast_framework/test_ast_node.py (1)
18-18: LGTM: Correct API updateThe method call has been properly updated from
get_root()toroot()to align with the new AST interface that removes theget_prefix.aibolit/ast_framework/scope.py (1)
21-21: LGTM: Consistent API refactoringThe method call has been correctly updated from
get_root()toroot()to align with the new AST interface naming conventions.aibolit/patterns/non_final_class/non_final_class.py (1)
16-16: LGTM: Proper method name updateThe method call has been correctly updated from
get_proxy_nodes()toproxy_nodes()to align with the new AST interface that removes getter-style naming.aibolit/patterns/instanceof/instance_of.py (1)
16-16: LGTM: Consistent API updatesBoth method calls have been correctly updated from
get_proxy_nodes()toproxy_nodes()to align with the new AST interface naming conventions. The functionality remains identical.Also applies to: 20-20
aibolit/patterns/non_final_argument/non_final_argument.py (1)
26-26: LGTM: Correct method name refactoringThe method call has been properly updated from
get_proxy_nodes()toproxy_nodes()to align with the new AST interface that removes getter-style naming conventions.aibolit/patterns/method_chaining/method_chaining.py (1)
16-18: LGTM: Clean method rename aligns with EO007 refactoring.The change from
get_proxy_nodestoproxy_nodesmaintains identical functionality while removing the unnecessaryget_prefix, which aligns with the EO007 check objective.aibolit/patterns/var_decl_diff/var_decl_diff.py (1)
79-79: LGTM: Clean method rename aligns with EO007 refactoring.The change from
get_subtreestosubtreesmaintains identical functionality while removing the unnecessaryget_prefix, which aligns with the EO007 check objective.aibolit/patterns/implements_multi/implements_multi.py (1)
12-12: LGTM: Clean method rename aligns with EO007 refactoring.The change from
get_proxy_nodestoproxy_nodesmaintains identical functionality while removing the unnecessaryget_prefix, which aligns with the EO007 check objective.aibolit/patterns/assign_null_finder/assign_null_finder.py (1)
14-14: LGTM: Clean method renames align with EO007 refactoring.The changes from
get_proxy_nodestoproxy_nodesmaintain identical functionality while removing the unnecessaryget_prefix, which aligns with the EO007 check objective.Also applies to: 17-17
aibolit/patterns/public_static_method/public_static_method.py (1)
20-20: LGTM: Clean method rename aligns with EO007 refactoring.The change from
get_proxy_nodestoproxy_nodesmaintains identical functionality while removing the unnecessaryget_prefix, which aligns with the EO007 check objective.aibolit/patterns/nested_blocks/nested_blocks.py (1)
22-23: LGTM! Method calls updated to new API.The method calls have been correctly updated to use the new non-getter naming convention (
subtrees()androot()instead ofget_subtrees()andget_root()). This aligns with the AST framework refactoring and maintains the same functionality.aibolit/utils/scope_status.py (1)
26-26: LGTM! Method renamed to follow new naming convention.The method has been correctly renamed from
get_status()tostatus()to remove the getter-style prefix. The implementation remains unchanged and the functionality is preserved.aibolit/patterns/joined_validation/joined_validation.py (1)
17-17: LGTM! Method call updated to new API.The method call has been correctly updated to use
proxy_nodes()instead ofget_proxy_nodes(). This aligns with the AST framework refactoring and maintains the same functionality for iterating over IF_STATEMENT nodes.aibolit/patterns/method_siblings/method_siblings.py (1)
21-21: LGTM! Method call updated to new API.The method call has been correctly updated to use
proxy_nodes()instead ofget_proxy_nodes(). This aligns with the AST framework refactoring and maintains the same functionality for iterating over METHOD_DECLARATION nodes.aibolit/metrics/local_methods_calls/local_methods_calls.py (1)
41-41: LGTM! Method calls updated to new API.Both method calls have been correctly updated to use
proxy_nodes()instead ofget_proxy_nodes(). This aligns with the AST framework refactoring and maintains the same functionality for iterating over METHOD_INVOCATION and METHOD_DECLARATION nodes respectively.Also applies to: 47-47
aibolit/patterns/er_class/er_class.py (1)
30-30: LGTM! Getter method refactoring correctly applied.The change from
get_proxy_nodestoproxy_nodessuccessfully removes the getter-style method prefix, aligning with the EO007 check requirements. The functionality remains identical while improving code consistency.aibolit/patterns/array_as_argument/array_as_argument.py (1)
16-17: LGTM! Systematic refactoring applied correctly.The method name change from
get_proxy_nodestoproxy_nodessuccessfully eliminates the getter-style prefix while maintaining the same functionality for multiple node types. This change aligns with the EO007 compliance objective.aibolit/metrics/external_methods_called/external_methods_called.py (1)
38-38: LGTM! Getter method refactoring correctly implemented.The change from
get_proxy_nodestoproxy_nodessuccessfully removes the getter-style method prefix while preserving the exact same functionality. This aligns with the EO007 check requirements.aibolit/patterns/var_siblings/var_siblings.py (2)
18-18: LGTM! Getter method refactoring correctly applied.The change from
get_proxy_nodestoproxy_nodessuccessfully removes the getter-style method prefix while maintaining identical functionality for local variable declaration nodes.
46-46: LGTM! Consistent refactoring applied.The method name change from
get_proxy_nodestoproxy_nodescorrectly implements the systematic refactoring to eliminate getter-style method names, aligning with the EO007 compliance objective.aibolit/metrics/NumberMethods/NumberMethods.py (1)
10-10: LGTM! Systematic refactoring completed correctly.The change from
get_proxy_nodestoproxy_nodessuccessfully eliminates the getter-style method prefix while preserving the exact same functionality. This change completes the consistent refactoring pattern across all reviewed files, aligning with the EO007 compliance objective.aibolit/patterns/return_null/return_null.py (1)
17-17: Method name update looks correct.The change from
get_proxy_nodestoproxy_nodesaligns with the PR objective of removing getter-style method names and is consistent with the updated AST API.aibolit/patterns/multiple_while/multiple_while.py (1)
16-19: Method name updates are correct and consistent.The changes from
get_subtreestosubtreesandget_root()toroot()properly align with the updated AST API and maintain the same functionality.aibolit/patterns/loop_outsider/loop_outsider.py (6)
30-31: Method name updates are correct.The changes from
get_proxy_nodestoproxy_nodesandget_subtreetosubtreeare consistent with the updated AST API.
50-50: Method name update is correct.The change from
get_proxy_nodestoproxy_nodesaligns with the updated AST API.
55-56: Method name update is correct.The change from
get_proxy_nodestoproxy_nodesis consistent with the updated AST API. The use ofexpressionlattribute is correct based on the codebase conventions.
63-63: Method name update is correct.The change from
get_subtreetosubtreealigns with the updated AST API.
66-67: Method name update is correct.The change from
get_proxy_nodestoproxy_nodesis consistent with the updated AST API.
72-73: Method name update is correct.The change from
get_proxy_nodestoproxy_nodesaligns with the updated AST API.aibolit/ast_framework/computed_fields_registry.py (1)
36-39: Method name update is correct.The change from
get_fieldstofieldsis consistent with the PR objective of removing getter-style method names. The method signature and functionality remain unchanged.aibolit/metrics/max_diameter/max_diameter.py (2)
17-17: Method name update is correct.The change from
get_subtreestosubtreesaligns with the updated AST API and maintains the same functionality.
23-23: Method name update is correct.The change from
get_root()toroot()is consistent with the updated AST API.aibolit/metrics/npath/main.py (1)
96-96: LGTM: Method name updated correctlyThe method call has been properly updated from
get_proxy_nodestoproxy_nodes, aligning with the broader refactoring effort to remove theget_prefix from AST methods.aibolit/patterns/mutable_index/mutable_index.py (5)
24-24: LGTM: Method name updated correctlyThe method call has been properly updated from
get_proxy_nodestoproxy_nodes.
26-26: LGTM: Method name updated correctlyThe method call has been properly updated from
get_subtreetosubtree.
33-36: LGTM: Method names updated consistentlyAll method calls have been properly updated to use the new naming convention:
get_subtree→subtreeget_proxy_nodes→proxy_nodes
42-42: LGTM: Method name updated correctlyThe method call has been properly updated from
get_proxy_nodestoproxy_nodes.
50-50: LGTM: Method name updated correctlyThe method call has been properly updated from
get_proxy_nodestoproxy_nodes.scripts/04-find-patterns.py (2)
60-61: LGTM: Method names updated correctlyBoth method calls have been properly updated to use the new naming convention:
get_subtree→subtreeget_root→root
74-74: LGTM: Method name updated correctlyThe method call has been properly updated from
get_roottoroot.aibolit/patterns/private_static_method/private_static_method.py (1)
14-14: LGTM: Method name updated correctlyThe method call has been properly updated from
get_proxy_nodestoproxy_nodes, maintaining the same functionality while following the new naming convention.aibolit/patterns/protected_method/protected_method.py (1)
14-14: LGTM: Method name updated correctlyThe method call has been properly updated from
get_proxy_nodestoproxy_nodes, maintaining the same functionality while following the new naming convention.aibolit/ast_framework/ast_node.py (1)
74-74: LGTM! Method name refactoring is consistent.The changes correctly update calls from
get_fieldstofieldsin the computed fields registry, aligning with the broader refactoring to removeget_prefixes from method names.Also applies to: 103-103
test/ast_framework/test_java_class_decomposition.py (1)
36-36: LGTM! Test updates align with AST API refactoring.All method calls have been correctly updated to use the new method names without the
get_prefix:
get_root()→root()get_subtree()→subtree()get_proxy_nodes()→proxy_nodes()The changes maintain the same logic and test coverage while conforming to the new API.
Also applies to: 43-43, 54-55, 64-64, 347-348, 368-368, 377-377
aibolit/patterns/classic_setter/classic_setter.py (1)
35-35: LGTM! Method call updated correctly.The change from
get_proxy_nodestoproxy_nodesaligns with the AST API refactoring to removeget_prefixes from method names.aibolit/patterns/classic_getter/classic_getter.py (1)
38-38: LGTM! Method call updated correctly.The change from
get_proxy_nodestoproxy_nodesaligns with the AST API refactoring to removeget_prefixes from method names.aibolit/patterns/string_concat/string_concat.py (1)
24-24: LGTM! Method call updated correctly.The change from
get_proxy_nodestoproxy_nodesaligns with the AST API refactoring to removeget_prefixes from method names.aibolit/patterns/send_null/send_null.py (2)
30-30: Method name refactoring correctly applied.The change from
get_proxy_nodestoproxy_nodesaligns with the EO007 check requirements and maintains the same functionality.
35-35: Consistent method name update.The second occurrence of
get_proxy_nodestoproxy_nodesis properly updated, maintaining consistency throughout the file.aibolit/metrics/RFC/rfc.py (4)
26-27: Method name refactoring correctly applied.The changes from
get_proxy_nodestoproxy_nodesandget_subtreetosubtreeare consistent with the EO007 check requirements and maintain the same functionality for RFC calculation.
32-32: Consistent root method update.The change from
get_roottorootis properly applied, maintaining consistency with the new AST interface.
38-39: Subtrees method refactoring correctly applied.The changes from
get_subtreestosubtreesandget_roottorootare consistent with the refactoring pattern and preserve the RFC calculation logic.
60-60: Final method name update is correct.The change from
get_proxy_nodestoproxy_nodesin the method invocation parameter extraction is properly applied.aibolit/patterns/supermethod/supermethod.py (1)
12-12: Method name refactoring correctly applied.The change from
get_proxy_nodestoproxy_nodesis consistent with the EO007 check requirements and maintains the same functionality for detecting super method invocations.aibolit/patterns/force_type_casting_finder/force_type_casting_finder.py (1)
11-11: Method name refactoring correctly applied.The change from
get_proxy_nodestoproxy_nodesis consistent with the EO007 check requirements and maintains the same functionality for detecting force type casting.aibolit/metrics/ncss/ncss.py (1)
19-19: Method name refactoring correctly applied.The change from
get_proxy_nodestoproxy_nodesis consistent with the EO007 check requirements and maintains the same functionality for NCSS metric calculation.aibolit/patterns/redundant_catch/redundant_catch.py (1)
27-27: LGTM: Consistent method name refactoringThe changes correctly update all AST framework method calls to use the new API without the
get_prefix. This aligns with the PR objective of enabling EO007 check to avoid getters and setters pattern.Also applies to: 33-34, 36-36, 43-43
aibolit/patterns/non_final_attribute/non_final_attribute.py (1)
14-14: LGTM: Consistent method name refactoringThe change correctly updates the AST framework method call to use the new API without the
get_prefix, consistent with the broader refactoring.aibolit/patterns/assert_in_code/assert_in_code.py (1)
16-16: LGTM: Consistent method name refactoringThe change correctly updates the AST framework method call to remove the
get_prefix, aligning with the PR's objective of avoiding getters and setters pattern.aibolit/patterns/null_check/null_check.py (1)
17-18: LGTM: Consistent method name refactoringThe changes correctly update AST framework method calls to use the new API without the
get_prefix. Bothproxy_nodesandsubtreemethod calls are properly updated.aibolit/patterns/if_return_if_detection/if_detection.py (1)
16-16: LGTM: Consistent method name refactoringThe change correctly updates the AST framework method call to remove the
get_prefix, maintaining consistency with the broader refactoring effort.aibolit/patterns/hybrid_constructor/hybrid_constructor.py (1)
81-81: LGTM: Method name updated correctlyThe change from
get_proxy_nodestoproxy_nodesaligns with the PR objective to remove getter/setter patterns and enable EO007 check.aibolit/patterns/incomplete_for/incomplete_for.py (1)
17-17: LGTM: Consistent API modernizationThe method name change from
get_proxy_nodestoproxy_nodesis consistent with the codebase-wide refactoring to remove getter prefixes.aibolit/patterns/var_middle/var_middle.py (4)
22-22: Note: Protected member access warningsThe change to access
_treeand_rootprivate attributes is consistent with the refactoring, but triggers pylint warnings about protected member access. This is expected as part of the API modernization.
24-26: LGTM: Consistent attribute access updatesThe updates to use
ast._treeinstead ofast.treeare consistent with the privatization of internal attributes across the codebase.
38-38: LGTM: Method name modernizationThe change from
scope_status.get_status()toscope_status.status()follows the same pattern of removing getter prefixes, consistent with the PR objectives.
55-55: LGTM: Consistent method name updateThe second instance of
status()method usage is correctly updated to match the new API.aibolit/patterns/partially_synchronized_methods/partially_synchronized_methods.py (3)
18-20: LGTM: Method name updated correctlyThe change from
get_subtreestosubtreesis consistent with the codebase-wide refactoring to remove getter prefixes.
21-21: LGTM: Root accessor method updatedThe change from
get_root()toroot()follows the same modernization pattern.
26-26: LGTM: Proxy nodes method updatedThe change from
get_proxy_nodestoproxy_nodescompletes the consistent refactoring across all AST method calls in this file.aibolit/patterns/empty_rethrow/empty_rethrow.py (2)
16-17: LGTM: Method chain updated correctlyThe change from
get_subtree(catch_clause).get_proxy_nodes(...)tosubtree(catch_clause).proxy_nodes(...)correctly updates both methods in the chain to remove getter prefixes.
26-26: LGTM: Consistent method name updateThe change from
get_proxy_nodestoproxy_nodesis consistent with the codebase-wide refactoring pattern.test/ast_framework/test_scope.py (1)
90-90: LGTM: Correct API refactoringThe method calls have been properly updated to use the new AST API without the
get_prefix. The functionality remains identical.Also applies to: 99-99
aibolit/__main__.py (1)
275-276: LGTM: Consistent API refactoringThe method calls have been correctly updated to use the new AST API methods
subtree()androot()without altering the underlying logic.aibolit/ast_framework/java_class_decomposition.py (1)
25-26: LGTM: Correct API refactoringThe method calls have been properly updated to use the new AST API without the
get_prefix. All changes maintain the same functionality while following the new naming conventions.Also applies to: 111-111, 130-130, 150-150, 159-164, 169-169, 182-182, 187-187, 192-192
aibolit/ast_framework/scope_extractors.py (1)
28-28: LGTM: Comprehensive API refactoringAll method calls have been correctly updated to use the new AST API methods. The scope extraction logic remains intact while following the new naming conventions consistently across all extractor functions.
Also applies to: 47-47, 54-54, 68-68, 81-81, 106-106, 123-123, 145-145, 160-160, 183-183, 202-203
aibolit/patterns/many_primary_ctors/many_primary_ctors.py (1)
17-17: LGTM: Correct API method updatesThe method calls have been properly updated to use the new AST API methods
proxy_nodes()andsubtree(). The pattern detection logic for primary constructors remains unchanged.Also applies to: 32-32
aibolit/metrics/fanout/FanOut.py (3)
16-16: LGTM: Method name updated to remove get_ prefixThe change from
get_subtreestosubtreesis consistent with the refactoring to avoid getter/setter naming conventions.
22-22: LGTM: Method name updated to remove get_ prefixThe change from
get_root()toroot()is consistent with the refactoring to avoid getter/setter naming conventions.
27-27: LGTM: Method name updated to remove get_ prefixThe change from
get_proxy_nodestoproxy_nodesis consistent with the refactoring to avoid getter/setter naming conventions.test/ast_framework/test_ast.py (6)
22-22: LGTM: Method name updated to remove get_ prefixThe change from
get_subtreestosubtreesis consistent with the refactoring.
31-31: LGTM: Method name updated to remove get_ prefixThe change from
get_root()toroot()is consistent with the refactoring.
43-43: LGTM: Method name updated to remove get_ prefixThe change from
get_nodestonodesis consistent with the refactoring.
45-45: LGTM: Method name updated to remove get_ prefixThe change from
get_member_reference_paramstomember_reference_paramsis consistent with the refactoring.
50-50: LGTM: Method name updated to remove get_ prefixThe change from
get_nodestonodesis consistent with the refactoring.
52-52: LGTM: Method name updated to remove get_ prefixThe change from
get_method_invocation_paramstomethod_invocation_paramsis consistent with the refactoring.aibolit/utils/java_parser.py (3)
140-140: LGTM: Method name updated to remove get_ prefixThe change from
get_empty_linestoempty_linesis consistent with the refactoring.
142-142: LGTM: Internal method call updated correctlyThe internal call was correctly updated from
get_non_empty_linestonon_empty_lines.
146-146: LGTM: Method name updated to remove get_ prefixThe change from
get_non_empty_linestonon_empty_linesis consistent with the refactoring.aibolit/metrics/cognitiveC/cognitive_c.py (1)
158-159: LGTM: Method names updated to remove get_ prefixThe changes from
get_subtreestosubtreesandget_root()toroot()are consistent with the refactoring.aibolit/patterns/multiple_try/multiple_try.py (1)
14-16: LGTM! API usage updated correctly.The method calls have been correctly updated to use the new AST API without the
get_prefix. The logic remains unchanged and functional.aibolit/ast_framework/ast.py (6)
33-34: Good encapsulation improvement.Making the
treeandrootattributes private with the underscore prefix improves encapsulation and follows Python conventions for internal attributes.
65-66: API method renaming executed correctly.The
get_root()method has been correctly renamed toroot()and properly uses the private_rootattribute.
72-72: Method name updated consistently.The
get_subtrees()method has been correctly renamed tosubtrees()following the pattern of removing theget_prefix.
95-95: Method name updated consistently.The
get_subtree()method has been correctly renamed tosubtree()following the pattern of removing theget_prefix.
176-176: Method name updated consistently.The
get_proxy_nodes()method has been correctly renamed toproxy_nodes()following the pattern of removing theget_prefix.
48-179: No remaining deprecated AST API usages detectedAll legacy calls to
get_root(),get_subtree(),get_subtrees(), andget_proxy_nodes()have been removed, and there are no direct accesses to.treeor.rootin your codebase. The public-API changes are applied consistently.
| @@ -1,4 +1,4 @@ | |||
| [flake8] | |||
| ignore = W504,EO001,EO002,EO003,EO004,EO005,EO007,EO008,EO009,EO01,EO02 | |||
| ignore = W504,EO001,EO002,EO003,EO004,EO005,EO008,EO009,EO01,EO02 | |||
There was a problem hiding this comment.
🛠️ Refactor suggestion
Clean-up the ignore list – stray/typo codes EO01, EO02 remain
While EO007 has been correctly dropped, the list still contains EO01 and EO02, which do not match the 3-digit pattern used by the rest of the elegant-objects plugin (EO0xx). They are likely typos or forgotten remnants (perhaps EO010, EO020, or duplicates of codes already present). Keeping unknown codes silently disables nothing and clutters the config.
Proposed fix:
-ignore = W504,EO001,EO002,EO003,EO004,EO005,EO008,EO009,EO01,EO02
+ignore = W504,EO001,EO002,EO003,EO004,EO005,EO008,EO009After cleaning, run flake8 locally to ensure no unintended violations surface.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ignore = W504,EO001,EO002,EO003,EO004,EO005,EO008,EO009,EO01,EO02 | |
| # .flake8 | |
| ignore = W504,EO001,EO002,EO003,EO004,EO005,EO008,EO009 |
🤖 Prompt for AI Agents
In the .flake8 file at line 2, the ignore list contains invalid or typo error
codes EO01 and EO02 that do not match the expected 3-digit pattern for
elegant-objects plugin codes. Remove these stray codes from the ignore list to
clean up the configuration. After making this change, run flake8 locally to
verify that no new linting errors appear.
|
@ivanovmg what's your take on this? |
There was a problem hiding this comment.
@AntonProkopyev I think it is a good idea to get rid of these getters and setters in AST!
I suppose that the changes in the cognitive complexity metric can probably be extracted into a separate PR dedicated to its refactoring, to make this particular PR more focused.
Anyway, it looks good to me.
@yegor256
|
@AntonProkopyev I believe, all suggestions of @ivanovmg above do make sense. Please, take them into account and then we merge. |
1865886 to
ecda9ac
Compare
|
@ivanovmg Just rebased the PR. Could you please take a look? |
ivanovmg
left a comment
There was a problem hiding this comment.
@AntonProkopyev this is perfect! Yet another step towards the Zen of Elegant Objects :)
@yegor256, approved from my side.
|
@rultor merge |
|
@AntonProkopyev Thanks for your substantial contribution of 460 hits-of-code! You've earned +8 points: +16 base, +16 for code volume (capped), -16 for exceeding 200 HOC, and -8 for exceeding 800 HOC. While we appreciate the effort, remember that concise code is often more valuable. Keep the contributions coming! Your balance now stands at +134. 🚀 |
Closes: #850
Summary by CodeRabbit
Refactor
Bug Fixes
Tests