Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unpin typing_extensions #1948

Merged
merged 1 commit into from
Dec 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion arviz/tests/base_tests/test_data_zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import shutil
from collections.abc import MutableMapping
from typing import Mapping

import numpy as np
import pytest
Expand All @@ -26,7 +27,8 @@ def data(self, draws, chains):
class Data:
# fake 8-school output
obj = {}
for key, shape in {"mu": [], "tau": [], "eta": [8], "theta": [8]}.items():
shapes: Mapping[str, list] = {"mu": [], "tau": [], "eta": [8], "theta": [8]}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider something more specific than list so it captures the types within the list? I'm not sure what np.random.randn requires the type of shape to be, exactly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i was actually surprised this popped up -- this is a literal dict used once, so List[int] (or something...) seems like it should have been deduced.

for key, shape in shapes.items():
obj[key] = np.random.randn(chains, draws, *shape)

return Data
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ packaging
pandas>=0.23
xarray>=0.16.1
netcdf4
typing_extensions>=3.7.4.3,<4
typing_extensions>=3.7.4.3
ColCarroll marked this conversation as resolved.
Show resolved Hide resolved