Skip to content

Commit 84f1bff

Browse files
committed
rebase
1 parent c419a9c commit 84f1bff

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

flask_googlemaps/__init__.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
__version__ = "0.5.0"
44

55
from json import dumps
6-
from typing import Optional, Dict, Any, List, Union, Tuple, Text
6+
from typing import Optional, Dict, Any, List, Union, Tuple, Text # noqa: F401
77

88
import requests
99
from flask import Blueprint, g, render_template
@@ -226,7 +226,7 @@ def build_rectangle_dict(
226226
def add_rectangle(
227227
self, north=None, west=None, south=None, east=None, **kwargs
228228
):
229-
# type: (Optional[float], Optional[float], Optional[float], Optional[float], **Any) -> None
229+
# type: (Optional[float], Optional[float], Optional[float], Optional[float], **Any) -> None # noqa E501
230230
"""Adds a rectangle dict to the Map.rectangles attribute
231231
232232
The Google Maps API describes a rectangle using the LatLngBounds
@@ -714,14 +714,16 @@ def build_heatmap(self, heatmap_data, heatmap_layer):
714714
raise AttributeError("heatmap_later requires 'heatmap_data'")
715715
if not isinstance(heatmap_data, (list)):
716716
raise AttributeError(
717-
"heatmap_data only accepts a list of dicts with keys 'lat' 'lng' and their corresponding values"
717+
"heatmap_data only accepts a list of dicts with keys "
718+
"'lat' 'lng' and their corresponding values"
718719
)
719720
for hm in heatmap_data:
720721
if isinstance(hm, dict):
721722
self.add_heatmap(**hm)
722723
else:
723724
raise AttributeError(
724-
"elements of list 'heatmap_data' must be a dict of keys 'lat' and 'lng' with their corresponding values"
725+
"elements of list 'heatmap_data' must be a dict of keys "
726+
"'lat' and 'lng' with their corresponding values"
725727
)
726728

727729
def add_heatmap(self, lat=None, lng=None, **kwargs):
@@ -820,7 +822,7 @@ def set_googlemaps_loaded():
820822
def get_address(API_KEY, lat, lon):
821823
# type: (str, float, float) -> dict
822824
add_dict = dict()
823-
response = rq.get(
825+
response = requests.get(
824826
"https://maps.googleapis.com/maps/api/geocode/json?latlng="
825827
+ ",".join(map(str, [lat, lon]))
826828
+ "&key="

0 commit comments

Comments
 (0)