Skip to content

Conversation

waffensultan
Copy link

Description

Changes made:

  • Replaced if/elif chain with match/case for clearer interval handling (Python 3.10+)
  • Removed redundant weekday variable
  • Simplified the monthly case by removing an unnecessary .replace(day=next_month.day) call, as the day will always be 1

Why:

  • Code clarity and maintainability
  • Eliminate redundant operations
  • Make future modifications easier

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • DevOps / CI changes

How Has This Been Tested?

Eyeballed it

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@waffensultan waffensultan requested a review from a team as a code owner September 14, 2025 10:45
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