Skip to content

Commit

Permalink
Add missing type hint imports, as suggested by mypy. (#1397)
Browse files Browse the repository at this point in the history
* Add missing type hint imports, as suggested by mypy.

* Use typing.Callable instead of builtins.callable, which isn't a type.
  • Loading branch information
obi1kenobi committed Sep 27, 2020
1 parent 24ce65a commit d6794f5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion arviz/data/io_numpyro.py
@@ -1,5 +1,6 @@
"""NumPyro-specific conversion code."""
import logging
from typing import Callable, Optional

import numpy as np
import xarray as xr
Expand All @@ -16,7 +17,7 @@ class NumPyroConverter:

# pylint: disable=too-many-instance-attributes

model = None # type: Optional[callable]
model = None # type: Optional[Callable]
nchains = None # type: int
ndraws = None # type: int

Expand Down
3 changes: 2 additions & 1 deletion arviz/data/io_pyro.py
@@ -1,5 +1,6 @@
"""Pyro-specific conversion code."""
import logging
from typing import Callable, Optional
import warnings

import numpy as np
Expand All @@ -18,7 +19,7 @@ class PyroConverter:

# pylint: disable=too-many-instance-attributes

model = None # type: Optional[callable]
model = None # type: Optional[Callable]
nchains = None # type: int
ndraws = None # type: int

Expand Down
2 changes: 1 addition & 1 deletion arviz/stats/stats.py
Expand Up @@ -4,7 +4,7 @@
import warnings
from collections import OrderedDict
from copy import deepcopy
from typing import List, Optional, Union
from typing import Any, Dict, List, Optional, Union

import numpy as np
import pandas as pd
Expand Down

0 comments on commit d6794f5

Please sign in to comment.