-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Drop if
clauses from each Bot
method
#3396
Conversation
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)}')
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
. SinceNone
values are dropped inBot._post
anyway, we can do this safelyChecklist for PRs
Added.. versionadded:: version
,.. versionchanged:: version
or.. deprecated:: version
to 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