From 4198a1f1076bfb8b9d22885c4b674a10de6cabff Mon Sep 17 00:00:00 2001 From: clampr Date: Thu, 1 Jul 2021 12:12:30 +0200 Subject: [PATCH] Meteostat 1.5.4 --- examples/daily/aggregate_regional.py | 2 +- meteostat/__init__.py | 2 +- meteostat/core/warn.py | 9 +++++---- setup.py | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/examples/daily/aggregate_regional.py b/examples/daily/aggregate_regional.py index e842311..0ba0b0d 100644 --- a/examples/daily/aggregate_regional.py +++ b/examples/daily/aggregate_regional.py @@ -25,7 +25,7 @@ stations = Stations() stations = stations.region('US') stations = stations.inventory('daily', (start, end)) - stations = stations.fetch(limit=50, sample=True) + stations = stations.fetch(limit=150, sample=True) # Get daily data data = Daily(stations, start, end) diff --git a/meteostat/__init__.py b/meteostat/__init__.py index 5ba8328..016bf0a 100644 --- a/meteostat/__init__.py +++ b/meteostat/__init__.py @@ -12,7 +12,7 @@ """ __appname__ = 'meteostat' -__version__ = '1.5.3' +__version__ = '1.5.4' from .interface.base import Base from .interface.timeseries import Timeseries diff --git a/meteostat/core/warn.py b/meteostat/core/warn.py index eb4e3d8..a826848 100644 --- a/meteostat/core/warn.py +++ b/meteostat/core/warn.py @@ -11,19 +11,20 @@ import warnings -def _warning_on_one_line(message, category, filename, lineno, line=None) -> str: # pylint: disable=unused-argument +def _warning_on_one_line(message, category, *args ,**kwargs) -> str: # pylint: disable=unused-argument """ Print warning on a single line """ return '%s: %s\n' % (category.__name__, message) - # Set warning format warnings.formatwarning = _warning_on_one_line - def warn(message: str) -> None: """ Create a warning """ - warnings.warn(message, Warning) + try: + warnings.warn(message, Warning) + except TypeError: + pass diff --git a/setup.py b/setup.py index f225bff..869af32 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ # Setup setup( name='meteostat', - version='1.5.3', + version='1.5.4', author='Meteostat', author_email='info@meteostat.net', description='Access and analyze historical weather and climate data with Python.',