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

Use the new format of options flow #899

Merged
merged 1 commit into from
Jan 19, 2025
Merged

Use the new format of options flow #899

merged 1 commit into from
Jan 19, 2025

Conversation

Vaskivskyi
Copy link
Owner

Fixes #896

@Vaskivskyi Vaskivskyi added the config_flow Configuration flow (UI) label Jan 19, 2025
@Vaskivskyi Vaskivskyi requested a review from Copilot January 19, 2025 20:10

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (3)

custom_components/asusrouter/config_flow.py:916

  • The config_entry parameter has been removed from the __init__ method of the AROptionsFlowHandler class. This is incorrect as the config_entry is required to initialize the options flow handler properly.
def __init__(self) -> None:

custom_components/asusrouter/config_flow.py:905

  • The return type of the async_get_options_flow method has been changed from OptionsFlow to AROptionsFlowHandler. This is incorrect and breaks the expected return type of the method.
def async_get_options_flow(config_entry: ConfigEntry) -> AROptionsFlowHandler:

custom_components/asusrouter/config_flow.py:153

  • [nitpick] The formatting changes have introduced inconsistencies in the code. For example, lines 153-156 and 179-183 have been split in a way that makes them harder to read. Consider reviewing the formatting changes to maintain readability and consistency.
_LOGGER.warning("Cannot get clients for %s: %s", configs[CONF_HOST], ex)
@Vaskivskyi Vaskivskyi merged commit 03d90b4 into dev Jan 19, 2025
4 checks passed
@Vaskivskyi Vaskivskyi deleted the config_flow branch January 19, 2025 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config_flow Configuration flow (UI)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Bug] setting option flow config_entry explicitly is deprecated
1 participant