-
Notifications
You must be signed in to change notification settings - Fork 6k
Drop if clauses from each Bot method
#3396
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
Conversation
Bibo-Joshi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments :)
BTW small script for double checking for typos:
import re
from pathlib import Path
bot = Path("telegram/_bot.py")
text = bot.read_text(encoding="utf-8")
for match in re.finditer(r"\"([\w_]+)\"\: ([^\},]+)(\}|,)", text):
if match.group(1) != match.group(2) and not match.group(2).startswith(
f"self._parse_file_input({match.group(1)}"
):
print(f'"{match.group(1)}": {match.group(2)}')
Bibo-Joshi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet, then I'm happy as well 👍 If there is nothing left from your side, give me a short ping and I'll merge :)
|
yep all good 👍🏽 |
Simplifies the bot methods by passing all arguments in
data. SinceNonevalues are dropped inBot._postanyway, we can do this safelyChecklist for PRs
Added.. versionadded:: version,.. versionchanged:: versionor.. deprecated:: versionto the docstrings for user facing changes (for methods/class descriptions, arguments and attributes)Documented code changes according to the CSI standardAdded myself alphabetically toAUTHORS.rst(optional)Added new classes & modules to the docs and all suitable__all__s