-
Notifications
You must be signed in to change notification settings - Fork 19
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
Making Apollo F1 Literate! #247
Conversation
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.
I think you might have some merge conflict tags left over in this file?
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.
Functionality seems good, though please add a few comments at least
|
||
def get_meeting(self, country=None, year=None): | ||
if country is None or year is None: | ||
request = get_request( |
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.
Could you replace these requests with non-blocking async requests? iirc there is a function to async fetch json in utils
}, | ||
) | ||
|
||
if request.json()[0] is None: |
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.
Check is request and/or request.json() is fine first
standings = [""] * len(drivers) | ||
counter = 1 | ||
for position in stats: | ||
if standings[position["position"] - 1] == "": | ||
standings[position["position"] - 1] = position["driver_number"] | ||
elif counter == len(drivers): | ||
break |
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.
Unless the data you get back is very cursed, this feels like it could easily be a list comprehension over stats (sorted by position first)
@@ -27,6 +27,7 @@ | |||
if secret_key is None: | |||
raise Exception("Set a secret key in config.yaml") | |||
|
|||
|
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.
Why add a new line here?
@@ -15,6 +15,7 @@ def __init__(self, preferred): | |||
# Default delimiter order | |||
delimiters = ["\n", ";", ",", " "] | |||
|
|||
|
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.
Why add a new line here?
<<<<<<< HEAD |
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.
Merge tags here as anna pointed out, can you remove .gitignore and the migration and splitutils from this pr?
API has too many issues and data is too cursed |
No description provided.