Skip to content
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
2 changes: 2 additions & 0 deletions ci/azure/azure_template_posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
NUMPY: 1.16.6
python39_latest:
python.version: '3.9'
python36_latest:
python.version: '3.6'
python38_mid_conda:
python.version: '3.8'
use.conda: true
Expand Down
2 changes: 0 additions & 2 deletions randomgen/tests/test_recent_numpy_changes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import annotations

from distutils.version import LooseVersion
from typing import cast

Expand Down
21 changes: 15 additions & 6 deletions randomgen/typing.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
from typing import TYPE_CHECKING, Any, Optional, Sequence, Union
import sys
from typing import TYPE_CHECKING, Optional, Sequence, Union

if TYPE_CHECKING:
from typing import Literal
from randomgen.seed_sequence import SeedSequence

SeedMode = Literal["sequence", "legacy"]
if sys.version_info >= (3, 8):
from typing import Literal
elif TYPE_CHECKING:
from typing_extensions import Literal
else:
SeedMode = Any

from randomgen.seed_sequence import SeedSequence
class _Literal:
def __getitem__(self, item):
pass

Literal = _Literal()

SeedMode = Literal["sequence", "legacy"]


__all__ = ["IntegerSequenceSeed", "SeedMode", "Size"]

Expand Down
2 changes: 0 additions & 2 deletions randomgen/xoshiro256starstar.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import annotations

from typing import Optional
import warnings

Expand Down
2 changes: 0 additions & 2 deletions randomgen/xoshiro512starstar.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import annotations

from typing import Optional
import warnings

Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
black==21.4b1
pytest>=6
pytest-cov
scipy>=1.3.2