Skip to content

Commit

Permalink
Meteostat 1.5.6 (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
clampr committed Jul 2, 2021
1 parent bc415de commit f444c24
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion meteostat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"""

__appname__ = 'meteostat'
__version__ = '1.5.5'
__version__ = '1.5.6'

from .interface.base import Base
from .interface.timeseries import Timeseries
Expand Down
6 changes: 4 additions & 2 deletions meteostat/core/warn.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,21 @@
import warnings


def _warning_on_one_line(message, category, *args ,**kwargs) -> str: # pylint: disable=unused-argument
def _format(message, category, filename, lineno, line=None) -> 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
warnings.formatwarning = _format

def warn(message: str) -> None:
"""
Create a warning
"""

try:
warnings.warn(message, Warning)
except TypeError:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Setup
setup(
name='meteostat',
version='1.5.5',
version='1.5.6',
author='Meteostat',
author_email='[email protected]',
description='Access and analyze historical weather and climate data with Python.',
Expand Down

0 comments on commit f444c24

Please sign in to comment.