Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Move this static method out of the class #76

Open
mpvanderschelling opened this issue Dec 6, 2023 · 0 comments
Open

Suggestion: Move this static method out of the class #76

mpvanderschelling opened this issue Dec 6, 2023 · 0 comments

Comments

@mpvanderschelling
Copy link

Problem

Move this static method out of the class and make it a module-level function. This will make it easier to test and reuse.

Proposed solution

def fiber_volume(radius: float) -> float:
    """calculate the fiber volume of the current fiber

    Parameters
    ----------
    radius : float
        radius

    Returns
    -------
    vol:float
        volume of current fiber(disk)
    """
    return (4 / 3) * np.pi * radius**3

Assignees:
Labels:

@staticmethod
def fiber_volume(radius: float) -> float:
"""calculate the fiber volume of the current fiber
Parameters
----------
radius : float
radius
Returns
-------
vol:float
volume of current fiber(disk)
"""
return (4 / 3) * np.pi * radius**3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant