Skip to content

Conversation

@harshil21
Copy link
Member

Simplifies the bot methods by passing all arguments in data. Since None values are dropped in Bot._post anyway, we can do this safely

Checklist for PRs

  • Added .. versionadded:: version, .. versionchanged:: version or .. deprecated:: version to the docstrings for user facing changes (for methods/class descriptions, arguments and attributes)
  • Created new or adapted existing unit tests
  • Documented code changes according to the CSI standard
  • Added myself alphabetically to AUTHORS.rst (optional)
  • Added new classes & modules to the docs and all suitable __all__ s

@harshil21 harshil21 added the 🛠 refactor change type: refactor label Nov 27, 2022
Copy link
Member

@Bibo-Joshi Bibo-Joshi left a 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)}')

Copy link
Member

@Bibo-Joshi Bibo-Joshi left a 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 :)

@harshil21
Copy link
Member Author

yep all good 👍🏽

@Bibo-Joshi Bibo-Joshi merged commit 4123e7a into master Dec 1, 2022
@Bibo-Joshi Bibo-Joshi deleted the drop-if-stmts-bot-methods branch December 1, 2022 18:26
@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

🛠 refactor change type: refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants