Skip to content

Allow multiple components of the same type in Googlev3.#409

Merged
KostyaEsmukov merged 1 commit into
geopy:masterfrom
pratheekrebala:googlev3-allow-duplicate-components
May 9, 2020
Merged

Allow multiple components of the same type in Googlev3.#409
KostyaEsmukov merged 1 commit into
geopy:masterfrom
pratheekrebala:googlev3-allow-duplicate-components

Conversation

@pratheekrebala

Copy link
Copy Markdown
Contributor

PR to address #407

This PR will allow GoogleV3 queries to accept a list of tuples as the component value. This should make it possible to add multiple constraints using the same component type. This change should not break the existing functionality of providing a dict with components.

Tests in test/geocoders/googlev3.py have also been updated.

The function will raise a ValueError if the input for the components parameter is not of type list or dict

E.g.:

[('administrative_area', 'CA'), ('administrative_area', 'Los Angeles')]

@KostyaEsmukov KostyaEsmukov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, merging. Thanks!

@KostyaEsmukov KostyaEsmukov merged commit 3182f07 into geopy:master May 9, 2020
@KostyaEsmukov KostyaEsmukov added this to the 1.22 milestone May 9, 2020
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