Skip to content

Conversation

@Billa32
Copy link

@Billa32 Billa32 commented Jul 26, 2021

The codes were repeated so the first aggregation i did was create a seperate function for it. in the file path ...\app\routers\v2.py and i added a new function get_latest_Data and thus i changed the code for return in function to "get_latest"and finally changed for return in function to "get_locations"

The codes were repeated so the first aggregation i did was create a seperate function for it. in the file path ...\app\routers\v2.py and i added a new function get_latest_Data and thus i changed the code for return in function to "get_latest"and finally changed for return in function to "get_locations"
@Kilo59
Copy link
Collaborator

Kilo59 commented Jul 26, 2021

This could be worthwhile. On my phone now so I can't see it context very well but I will look again.

Copy link
Collaborator

@Kilo59 Kilo59 left a comment

Choose a reason for hiding this comment

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

I think I would approve with these minimal changes.

NYT = "nyt"


def get_latest_data(locations):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
def get_latest_data(locations):
def _get_latest_data(locations) -> dict:

Can we make this private since it really shouldn't be used outside of this module?

@Kilo59 Kilo59 closed this Jul 27, 2021
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