harshil21 ยท GitHub

@SimonDamberg

Copy link Copy Markdown

Contributor

  • TelegramObject.__getitem__ now raises KeyError instead of returning None, and a special case is made for obj['from'] to look up obj['from_user'].
  • Removed __getitem__ override from Message
  • Test for Message changed to check for KeyError instead of None.

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
  • Added myself alphabetically to AUTHORS.rst (optional)

@harshil21 harshil21 linked an issue

Oct 9, 2021

that may be closed by this pull request

Closed

harshil21

Copy link Copy Markdown

Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a pre-commit test failing. Can you add a pylint ignore on that line? see the other places in the code on how to add a pylint ignore.

@Bibo-Joshi

Copy link Copy Markdown

Member

There's a pre-commit test failing. Can you add a pylint ignore on that line? see the other places in the code on how to add a pylint ignore.

rather just do what pylint suggests to do ;)

@SimonDamberg

Copy link Copy Markdown

Contributor Author

Addressed your comments ๐Ÿ˜„

@SimonDamberg

Bibo-Joshi

Copy link Copy Markdown

Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I left a bit of nitpicking below :)

@Bibo-Joshi

Copy link Copy Markdown

Member

@SimonDamberg

Copy link Copy Markdown

Contributor Author

A lot of things came up at school and job. If someone wants to clean up and finish, feel free to do so :)

@Poolitzer @Bibo-Joshi

@Bibo-Joshi

@Bibo-Joshi

@harshil21

# Conflicts:
#	tests/test_conversationhandler.py

harshil21

Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>

harshil21

@Bibo-Joshi

@Bibo-Joshi

Copy link Copy Markdown

Member

Read the original on github.com โ†—