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

fix type for notificationIDList in _build_monitor_data() #57

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

obfusk
Copy link

@obfusk obfusk commented Sep 16, 2023

The type here is incorrect. In _build_monitor_data(), the notificationIDList parameter is a list, which then gets converted to a dict in _convert_monitor_input().

The wrong type here doesn't actually affect anything as it is an empty dict and thus never processed in _convert_monitor_input(), as an empty list would have been as well.

    dict_notification_ids = {}
    if kwargs["notificationIDList"]:
        for notification_id in kwargs["notificationIDList"]:
            dict_notification_ids[notification_id] = True
    kwargs["notificationIDList"] = dict_notification_ids

But it's still technically the wrong type in that part of the code, and changing other parts of the code could result in that causing a bug at some point.

NB: I haven't tested this change yet.

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.

None yet

1 participant