Veranika_Rechyts_verarechyts@gmail.com#10
Conversation
|
Please edit this pull request according to PR requirements and put a label on it |
|
Please check project structure requirements and see the example in FinalTask.md. |
| import sys | ||
| import argparse | ||
| import logging | ||
| from final_task.rss_reader import rss_reader |
There was a problem hiding this comment.
This package import is redundant here. Think about where exactly import statements starts to search for specified module.
| from final_task.rss_reader import rss_reader | ||
|
|
||
|
|
||
| __version__ = '1.0' |
There was a problem hiding this comment.
Global variables are usually declared in uppercase e.g. VERSION
| dict_from_rss_site = feedparser.parse(source) | ||
| if dict_from_rss_site: | ||
| return dict_from_rss_site | ||
| else: return ConnectionError(f"{source} can't be reached") |
There was a problem hiding this comment.
Usually it is better to raise exceptions, not to return them
| def check_key_in_dict_from_rss_site(dict_from_rss_site, key): | ||
| """Function for checking existing of key in dict""" | ||
| if dict_from_rss_site.get(key, None): | ||
| return True | ||
| return False |
There was a problem hiding this comment.
It is better to use in operator instead of this function. For example:
if key in dict_from_rss_site:
|
Unfortunately I was not able to launch your script because of |
|
Oh thank you for your notices, when i return i will correct and redo,
unfortunetly, i am absent in Belarus for 2 weeks and don't have possibility
to check, sorry about that.
среда, 6 ноября 2019 г. пользователь Henadzi Stantchik <
notifications@github.com> написал:
… Please edit this pull request according to PR requirements and put a label
on it
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#10?email_source=notifications&email_token=ANWA7HKWQWOPSCI3NRXVOFDQSJVONA5CNFSM4JJQPNBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDFRBUQ#issuecomment-550179026>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANWA7HOYYRKWCBMGE7F2DUDQSJVONANCNFSM4JJQPNBA>
.
|
please review