Skip to content

Commit

Permalink
Use forward proof abc classes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexamici committed May 14, 2019
1 parent 19c0067 commit c11ab4e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cfgrib/messages.py
Expand Up @@ -46,7 +46,7 @@


@attr.attrs()
class Message(collections.MutableMapping):
class Message(collections.abc.MutableMapping):
"""Dictionary-line interface to access Message headers."""

codes_id = attr.attrib()
Expand Down Expand Up @@ -193,7 +193,7 @@ def __setitem__(self, item, value):


@attr.attrs()
class FileStream(collections.Iterable):
class FileStream(collections.abc.Iterable):
"""Iterator-like access to a filestream of Messages."""

path = attr.attrib(type=str)
Expand Down Expand Up @@ -247,7 +247,7 @@ def compat_create_exclusive(path, *args, **kwargs):


@attr.attrs()
class FileIndex(collections.Mapping):
class FileIndex(collections.abc.Mapping):
allowed_protocol_version = '1'
filestream = attr.attrib(type=FileStream)
index_keys = attr.attrib(type=T.List[str])
Expand Down

0 comments on commit c11ab4e

Please sign in to comment.