Skip to content
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

PCC04 jatinsinghal1921 #529

Merged
merged 1 commit into from
Sep 6, 2019
Merged

PCC04 jatinsinghal1921 #529

merged 1 commit into from
Sep 6, 2019

Conversation

jatinsinghal1921
Copy link
Contributor

Difficulty level (1-10): [2]
Estimated time spent (hours): [4]
Completed (yes/no): [Yes]
I stretched my coding skills (if yes what did you learn?): [I learned Tweepy API modules.]
Other feedback (what can we improve?): []

@@ -0,0 +1,6 @@
# Don't track content of these folders
Copy link
Collaborator

Choose a reason for hiding this comment

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

May wish to eliminate .gitignore from your PR. The contents you add are Windows specific, and it's best practice to let everyone define their own local ignore settings.

if not os.path.exists(DEST_DIR):
os.makedirs(DEST_DIR)

file_name = "./" + DEST_DIR + "/" + self.handle + ".csv"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Might consider using pathlib for this. Cross platform and much cleaner.


def __getitem__(self, pos):
"""See http://pybit.es/python-data-model.html"""
return (self._tweets)[pos]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider adding some type checks? As per https://docs.python.org/3/reference/datamodel.html#object.__getitem__ you can throw a TypeError here.

@feoh feoh merged commit 604409e into pybites:community Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants