Skip to content

Commit 7c37f66

Browse files
committed
fix open for py35
* also add references header in pvgis.py
1 parent 5bea928 commit 7c37f66

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

pvlib/iotools/pvgis.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,13 @@ def get_pvgis_tmy(lat, lon, outputformat='json', usehorizon=True,
7171
the error message in the response will be raised as an exception,
7272
otherwise raise whatever ``HTTP/1.1`` error occurred
7373
74+
References
75+
----------
76+
7477
.. [1] `PVGIS <https://ec.europa.eu/jrc/en/pvgis>`_
7578
.. [2] `PVGIS TMY tool <https://ec.europa.eu/jrc/en/PVGIS/tools/tmy>`_
76-
.. [3] `PVGIS horizon profile tool <https://ec.europa.eu/jrc/en/PVGIS/tools/horizon>`_
79+
.. [3] `PVGIS horizon profile tool
80+
<https://ec.europa.eu/jrc/en/PVGIS/tools/horizon>`_
7781
"""
7882
# use requests to format the query string by passing params dictionary
7983
params = {'lat': lat, 'lon': lon, 'outputformat': outputformat}

pvlib/test/test_pvgis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def epw_meta():
6060

6161
@pytest.fixture
6262
def meta_expected():
63-
with open(DATA / 'pvgis_tmy_meta.json') as f:
63+
with (DATA / 'pvgis_tmy_meta.json').open() as f:
6464
return json.load(f)
6565

6666

0 commit comments

Comments
 (0)