Skip to content

Commit

Permalink
Fix flake8 errors
Browse files Browse the repository at this point in the history
./test/geocoders/googlev3.py:159:35: E231 missing whitespace after ','
./test/geocoders/googlev3.py:163:32: E231 missing whitespace after ','
./test/geocoders/googlev3.py:163:91: E501 line too long (100 > 90 characters)
./geopy/geocoders/googlev3.py:218:1: W293 blank line contains whitespace
./geopy/geocoders/googlev3.py:219:91: E501 line too long (93 > 90 characters)
./geopy/geocoders/googlev3.py:221:1: W293 blank line contains whitespace
./geopy/geocoders/googlev3.py:223:1: W293 blank line contains whitespace
  • Loading branch information
KostyaEsmukov committed May 9, 2020
1 parent 69946f4 commit 94ff1a9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
18 changes: 10 additions & 8 deletions geopy/geocoders/googlev3.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,16 @@ def geocode(
:param str region: The region code, specified as a ccTLD
("top-level domain") two-character value.
:param Union[dict,list] components: Restricts to an area. Can use any combination
of: route, locality, administrative_area, postal_code, country.
Pass a list of tuples if you want to specify multiple components of the same type
e.g.:
>>> [('administrative_area','VA'), ('administrative_area':'Arlington')]
:type components: dict or list
:param components: Restricts to an area. Can use any combination of:
`route`, `locality`, `administrative_area`, `postal_code`,
`country`.
Pass a list of tuples if you want to specify multiple components of
the same type, e.g.:
>>> [('administrative_area', 'VA'), ('administrative_area', 'Arlington')]
:param str place_id: Retrieve a Location using a Place ID.
Cannot be not used with ``query`` or ``bounds`` parameters.
Expand Down
7 changes: 5 additions & 2 deletions test/geocoders/googlev3.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,14 @@ def test_format_components_param(self):

self.assertEqual(f([('country', 'FR')]), 'country:FR')
output = f([
('administrative_area','CA'),
('administrative_area', 'CA'),
('administrative_area', 'Los Angeles'),
('country', 'US')
])
self.assertEqual(output,'administrative_area:CA|administrative_area:Los Angeles|country:US')
self.assertEqual(
output,
'administrative_area:CA|administrative_area:Los Angeles|country:US'
)

with self.assertRaises(ValueError):
f(None)
Expand Down

0 comments on commit 94ff1a9

Please sign in to comment.