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

[TECH DEBT]: TreeHelper uses classmethods instead of staticmethod's for utitility functions #3549

Open
1 task done
JCZuurmond opened this issue Jan 20, 2025 · 0 comments
Open
1 task done
Labels
enhancement New feature or request needs-triage

Comments

@JCZuurmond
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues

Problem statement

TreeHelper uses classmethods instead of staticmethod's for utitility functions which is an uncommon use for classmethods

For example, from geek for geeks

When to use the class or static method?

  • We generally use the class method to create factory methods. Factory methods return class objects ( similar to a constructor ) for different use cases.
  • We generally use static methods to create utility functions.

Proposed Solution

Use staticmethod's instead

Additional Context

No response

@JCZuurmond JCZuurmond added enhancement New feature or request needs-triage labels Jan 20, 2025
@JCZuurmond JCZuurmond added this to UCX Jan 20, 2025
@github-project-automation github-project-automation bot moved this to Todo in UCX Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-triage
Projects
Status: Todo
Development

No branches or pull requests

1 participant