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

Disconnected instances of rate-limiting constant #2668

Open
dgw opened this issue Mar 15, 2025 · 0 comments
Open

Disconnected instances of rate-limiting constant #2668

dgw opened this issue Mar 15, 2025 · 0 comments
Labels
Bug Things to squish; generally used for issues Needs Triage Issues that need to be reviewed and categorized

Comments

@dgw
Copy link
Member

dgw commented Mar 15, 2025

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.

@dgw dgw added Bug Things to squish; generally used for issues Needs Triage Issues that need to be reviewed and categorized labels Mar 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Things to squish; generally used for issues Needs Triage Issues that need to be reviewed and categorized
Projects
None yet
Development

No branches or pull requests

1 participant