You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The field self.r, defined in the context of the variable minor_radius, may cause confusion with the field self.R defined on line 1241. This can make the code harder to read and maintain, especially for new contributors or in scenarios where both fields are used in close proximity.
Renaming the field r to something more descriptive (e.g., minor_radius) can prevent ambiguities and align the code with best practices for naming.
Motivation:
Clarity: The visual difference between r and R is minimal, which might lead to misinterpretation or bugs in future implementations.
Improved Maintainability: A more descriptive name enhances the understanding of the field's purpose.
Tool Conformance: This change resolves the code smell flagged by the SonarQube static analysis tool.
Impact on Existing Code:
Renaming the field will require updating all occurrences of self.r in the code to the new name. This can be safely handled using refactoring tools. Existing tests should be run to ensure the functionality remains intact.
Proposed Solution:
Rename the field self.r to self.minor_radius or another name that consistently reflects its purpose, in this file "manim/mobject/three_d/three_dimensions.py".
Uh oh!
There was an error while loading. Please reload this page.
Description:
Motivation:
Impact on Existing Code:
Proposed Solution:
Rename the field self.r to self.minor_radius or another name that consistently reflects its purpose, in this file "manim/mobject/three_d/three_dimensions.py".
For example:
References:
The text was updated successfully, but these errors were encountered: