Skip to content

Commit ba64afa

Browse files
committed
Fix type checking for variational/approximations
1 parent b336ee3 commit ba64afa

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

pymc/variational/approximations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
14+
from typing import Optional
1515

1616
import numpy as np
1717
import pytensor
@@ -331,7 +331,7 @@ def sample_approx(approx, draws=100, include_transformed=True):
331331
class SingleGroupApproximation(Approximation):
332332
"""Base class for Single Group Approximation"""
333333

334-
_group_class = None
334+
_group_class: Optional[type] = None
335335

336336
def __init__(self, *args, **kwargs):
337337
groups = [self._group_class(None, *args, **kwargs)]

scripts/run_mypy.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
pymc/printing.py
4343
pymc/pytensorf.py
4444
pymc/sampling/jax.py
45-
pymc/variational/approximations.py
4645
pymc/variational/opvi.py
4746
"""
4847

0 commit comments

Comments
 (0)