-
Notifications
You must be signed in to change notification settings - Fork 0
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
Robota #1
base: master
Are you sure you want to change the base?
Robota #1
Conversation
mail.py
Outdated
message = 'Shalom Adonai, irmãos. {} novos emails, deem uma olhada.'.format(number_of_new_mails) | ||
else: | ||
message = 'Shalom Adonai, irmãos. Novo email, deem uma olhada.\n\nTítulo: {}\n\nRemetente: {}'.format(subject, sender) | ||
for ss in senders_subjects: |
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.
avoid using abbreviations or simplified names for variables, it's better to be explicit about what we are doing here.
This variable is something related to an old army from europe or it's a abbreviation for sender_object ?
mail.py
Outdated
file_reader.close() | ||
|
||
|
||
latest_email_id = possible_new_email_id |
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.
How can possible_new_email_id
be not a new email ? There is not checks that validate such name or latest_email_id
. You should aim to rename possible_new_email_id
to just new_email_id
to simplify logic and names.
@@ -3,6 +3,7 @@ | |||
|
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.
This commit messages is not clear, I believe that you want to say:
Changing email script to support multiple emails subjects in inbox
or something like.
@@ -25,6 +25,5 @@ def get_sender(self): | |||
|
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.
Usually commit messages are don in an imperative format, take a look in https://chris.beams.io/posts/git-commit/
@@ -11,40 +11,38 @@ def check_gmail(): | |||
|
|||
imap = ImapGmailWrapper(mail, app_password) | |||
imap.select_mail_box('inbox') | |||
possible_new_email_id = int(imap.get_last_email_id('UNSEEN')) | |||
new_email_id = int(imap.get_last_email_id('UNSEEN')) |
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.
This should be squashed with 5453374
Changing the message that's sent when a new e-mail arrives.