Skip to content

PART 3: refactor: move static methods to free functions - After #429+#430#432

Draft
okurz wants to merge 1 commit intoopenSUSE:masterfrom
okurz:feature/033_improve_code_quality_remove_all_staticmethods
Draft

PART 3: refactor: move static methods to free functions - After #429+#430#432
okurz wants to merge 1 commit intoopenSUSE:masterfrom
okurz:feature/033_improve_code_quality_remove_all_staticmethods

Conversation

@okurz
Copy link
Member

@okurz okurz commented Mar 10, 2026

Motivation: Adhere to project guidelines to prioritize functional style
over Object-Oriented and address reviewer feedback.

Design Choices:

  • Extracted logic from @staticmethod methods into module-level functions.
  • Kept original method names as minimal wrappers where necessary for
    backward compatibility and test stability.
  • Updated tests to use module-level patching instead of patch.object where
    appropriate.

User Benefits:

  • Improved code maintainability through explicit data flow.
  • Enhanced testability by allowing logic to be verified in isolation.
  • Cleaner class definitions focused on state management.

After:

@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (5fb9462) to head (6acb6ae).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #432   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           91        91           
  Lines         8614      8600   -14     
  Branches       460       460           
=========================================
- Hits          8614      8600   -14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@okurz okurz changed the title refactor: move static methods to free functions PART 3: refactor: move static methods to free functions - After #429 Mar 10, 2026
@okurz okurz changed the title PART 3: refactor: move static methods to free functions - After #429 PART 3: refactor: move static methods to free functions - After #429+430 Mar 10, 2026
@okurz okurz changed the title PART 3: refactor: move static methods to free functions - After #429+430 PART 3: refactor: move static methods to free functions - After #429+#430 Mar 10, 2026
@okurz okurz force-pushed the feature/033_improve_code_quality_remove_all_staticmethods branch 3 times, most recently from 8d7441b to 5903fda Compare March 13, 2026 08:48
@openSUSE openSUSE deleted a comment from mergify bot Mar 13, 2026
@openSUSE openSUSE deleted a comment from mergify bot Mar 13, 2026
@okurz okurz force-pushed the feature/033_improve_code_quality_remove_all_staticmethods branch from 5903fda to dc9a576 Compare March 17, 2026 10:32
@asmorodskyi asmorodskyi self-requested a review March 18, 2026 08:28
@okurz okurz force-pushed the feature/033_improve_code_quality_remove_all_staticmethods branch from dc9a576 to 149855c Compare March 18, 2026 09:34
Motivation: Adhere to project guidelines to prioritize functional style
over Object-Oriented and address reviewer feedback.

Design Choices:
- Extracted logic from @staticmethod methods into module-level functions.
- Kept original method names as minimal wrappers where necessary for
  backward compatibility and test stability.
- Updated tests to use module-level patching instead of patch.object where
  appropriate.

User Benefits:
- Improved code maintainability through explicit data flow.
- Enhanced testability by allowing logic to be verified in isolation.
- Cleaner class definitions focused on state management.
@okurz okurz force-pushed the feature/033_improve_code_quality_remove_all_staticmethods branch from 149855c to ee524e9 Compare March 18, 2026 09:39
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

Successfully merging this pull request may close these issues.

1 participant