Conversation
MahtabRanjbar
commented
Dec 19, 2021
- delete documantation of send_message function in src/run.py
- delete bot.run() in src/run.py.
- update constants.py to add keys.exit into keyboards.
| """ | ||
| Send message to telegram bot. | ||
| """ |
There was a problem hiding this comment.
If you're deleting a wrong documentation, you should replace it with the correct one.
There was a problem hiding this comment.
is it ok to write '"" send message to telegram user""" ?
There was a problem hiding this comment.
I think yes. It's okay to replace it with correct docstring.
| if __name__ == '__main__': | ||
| logger.info('Bot started') | ||
| nashenas_bot = Bot(telebot=bot) | ||
| nashenas_bot.run() |
There was a problem hiding this comment.
This is not right. You're just deleting the run part.
There was a problem hiding this comment.
that part was extra. we add bot.infinity_pulling in init and we do not have run method in our class. out bot start running when initialized
There was a problem hiding this comment.
I see. So nashenas_bot name should be fixed cause this is a template bot. Can you change it to
logger.info('Bot started...')
Bot(telebot=bot)
There was a problem hiding this comment.
yea that's right. I will do that
|
An important thing is “break up each change into individual commits”.
Here I see three different changes. One, doc fix; Second, adding a functionality and, third, fixing a (maybe redundant) line in code.
Please break them up to three different commits.
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
From: ***@***.***>
Sent: Monday, December 20, 2021 01:37
To: ***@***.***>
Cc: ***@***.***>
Subject: [pytopia/project-template-telegram-bot] fix bugs in run.py and constants.py (PR #1)
* delete documantation of send_message function in src/run.py
* delete bot.run() in src/run.py.
* update constants.py to add keys.exit into keyboards.
You can view, comment on, or merge this pull request online at:
#1
Commit Summary
* a47ab3e<a47ab3e> fix bugs in run.py and constants.py
File Changes
(2 files<https://github.com/pytopia/project-template-telegram-bot/pull/1/files>)
* M src/constants.py<https://github.com/pytopia/project-template-telegram-bot/pull/1/files#diff-42d0f00c4780305311eae71fecca993a0523587cb4156e039cabd0d1ad8dbbb8> (2)
* M src/run.py<https://github.com/pytopia/project-template-telegram-bot/pull/1/files#diff-525565c956f875698bc74ac798b474aa561f4570464b770434888cfbf34bde48> (6)
Patch Links:
* https://github.com/pytopia/project-template-telegram-bot/pull/1.patch
* https://github.com/pytopia/project-template-telegram-bot/pull/1.diff
—
Reply to this email directly, view it on GitHub<#1>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABOG2U3JC7UVJIJYQSISSC3URZJQRANCNFSM5KMLEDDQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Agreed Alireza, but this these are very small fixes, I think it's ok to merge them into on PR fix commit. |
|
@arf1372 |
Uh, I think having separate commit for each change worth it, specially when dealing with "git bisect" and "git blame" stuff. |
a47ab3e to
b0d9a60
Compare