Skip to content

Conversation

@dmitriiweb
Copy link
Contributor

No description provided.

Copy link
Member

@KostyaEsmukov KostyaEsmukov left a comment

Choose a reason for hiding this comment

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

Thanks! I suggested an improvement.

Also, could you please add new tests for locations which were previously raising the KeyError?

elif address_city and address_country_code:
address = ', '.join([address_city, address_country_code])
else:
address = ''
Copy link
Member

Choose a reason for hiding this comment

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

A less verbose but much more readable alternative:

from geopy.util import join_filter

address = join_filter(', ', [address_city, address_country_code])

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Member

@KostyaEsmukov KostyaEsmukov left a comment

Choose a reason for hiding this comment

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

Looks good, thank you!

@KostyaEsmukov KostyaEsmukov merged commit 564b9cc into geopy:master Sep 22, 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