fix: change import from RequestRate to Rate - #88
Conversation
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
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
RequestRatefrom the import statement inwenxian/feeder/session.py
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| from __future__ import annotations | ||
|
|
||
| from pyrate_limiter import Duration, Limiter, RequestRate | ||
| from pyrate_limiter import Duration, Limiter |
There was a problem hiding this comment.
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.
| from pyrate_limiter import Duration, Limiter | |
| from pyrate_limiter import Duration, Limiter, RequestRate |
No description provided.