Skip to content

Disconnected instances of rate-limiting constant #2668

@dgw

Description

@dgw

I was exploring the other day (don't remember what for, exactly) and the below constant + comment caught my attention enough to leave the file open.

IGNORE_RATE_LIMIT = 1 # equivalent to sopel.plugin.NOLIMIT
"""Return value used to indicate that rate-limiting should be ignored."""

Finally coming back to it now, I seriously wonder: Shouldn't this (plugins.rules.IGNORE_RATE_LIMIT) and plugin.NOLIMIT use the same value declaration, instead of relying on multiple assignments in different files to match? As in, plugin.NOLIMIT should be an alias to this value, not a separate declaration.

Clearly this isn't a priority, but I have started to think of it as a code smell of sorts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugThings to squish; generally used for issuesNeeds TriageIssues that need to be reviewed and categorized

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions