Remove usage of get_distribution function
This pull request proposes removing the usage of get_distribution function, since the Official Pyrogram is kind of abandoned, and there are countably infinite number of Pyrogram forks, which could be changed by just changing the requirements.txt file without changing any other places in this source code.
Summary by Sourcery
This pull request removes the usage of the get_distribution function for determining the Pyrogram version in status_utils.py. This change allows for easier switching between different Pyrogram forks by only modifying the requirements.txt file.
-
Enhancements:
- Removed the usage of
get_distributionfunction to determine the Pyrogram version, simplifying the version retrieval process.
- Removed the usage of
Reviewer's Guide by Sourcery
This pull request removes the usage of the get_distribution function from the bot/helper/ext_utils/status_utils.py file. The change is motivated by the fact that the official Pyrogram is no longer actively maintained, and there are many forks available. By removing the dependency on get_distribution, the code becomes more flexible and can easily switch between different Pyrogram forks by simply updating the requirements.txt file.
File-Level Changes
| Files | Changes |
|---|---|
bot/helper/ext_utils/status_utils.py |
Removed the usage of get_distribution function and replaced it with a direct assignment to pyrogramversionstr. |
Tips
- Trigger a new Sourcery review by commenting
@sourcery-ai reviewon the pull request. - You can change your review settings at any time by accessing your dashboard:
- Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
- Change the review language;
- You can always contact us if you have any questions or feedback.