Skip to content

fix: change import from RequestRate to Rate - #88

Closed
njzjz wants to merge 2 commits into
masterfrom
njzjz-patch-1
Closed

fix: change import from RequestRate to Rate#88
njzjz wants to merge 2 commits into
masterfrom
njzjz-patch-1

Conversation

@njzjz

@njzjz njzjz commented Feb 14, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings February 14, 2026 09:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request attempts to fix an import statement in the session module by changing from RequestRate to Rate from the pyrate_limiter library. However, the fix is incomplete - while the import statement was updated, the actual usage of RequestRate on line 35 was not changed to use Rate, which will cause a runtime error.

Changes:

  • Removed RequestRate from the import statement in wenxian/feeder/session.py

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread wenxian/feeder/session.py
from __future__ import annotations

from pyrate_limiter import Duration, Limiter, RequestRate
from pyrate_limiter import Duration, Limiter

Copilot AI Feb 14, 2026

Copy link

Choose a reason for hiding this comment

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

The import has been changed from RequestRate to Rate, but line 35 still uses RequestRate(1, Duration.SECOND * 3). This will cause a NameError at runtime since RequestRate is no longer imported. Either Rate needs to be used on line 35, or RequestRate needs to be re-added to this import statement.

Suggested change
from pyrate_limiter import Duration, Limiter
from pyrate_limiter import Duration, Limiter, RequestRate

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@copilot Rename RequestRate to Rate.

Copilot AI commented Feb 14, 2026

Copy link
Copy Markdown
Contributor

@njzjz I've opened a new pull request, #89, to work on those changes. Once the pull request is ready, I'll request review from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants