Drop if clauses from each Bot method#3396
Merged
Bibo-Joshi merged 4 commits intomasterfrom Dec 1, 2022
Merged
Conversation
Bibo-Joshi
reviewed
Nov 29, 2022
Member
Bibo-Joshi
left a comment
There was a problem hiding this comment.
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
approved these changes
Dec 1, 2022
Member
Bibo-Joshi
left a comment
There was a problem hiding this comment.
Sweet, then I'm happy as well 👍 If there is nothing left from your side, give me a short ping and I'll merge :)
Member
Author
|
yep all good 👍🏽 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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