Skip to content

Move seconds_to_rads to a standalone function - #182

Open
Mustaphayinka wants to merge 1 commit into
google:copybara_pushfrom
Mustaphayinka:standalone-seconds-to-rads-issue-117
Open

Move seconds_to_rads to a standalone function#182
Mustaphayinka wants to merge 1 commit into
google:copybara_pushfrom
Mustaphayinka:standalone-seconds-to-rads-issue-117

Conversation

@Mustaphayinka

Copy link
Copy Markdown

Fixes #117

Moves secondstorads out of WeatherController and into a standalone, module-level function, following your follow-up advice to use a standalone function instead of a static method.

Changes: The function now sits above BaseWeatherController, and the nonexistent self parameter has been removed. WeatherController.getcurrenttemp is called directly at its call site rather than through self. In weathercontrollertest.py, testsecondstorad now calls weathercontroller.secondstorads(...) directly, so it tests a pure function.
Verified that the function’s output exactly matches all three existing test cases (minrad, maxrad, mid_rad).

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.

Convert WeatherController.seconds_to_rads to a Static Method

1 participant