Skip to content

Commit

Permalink
Mark tests as 'avoidable' to prevent them from running on Github
Browse files Browse the repository at this point in the history
  • Loading branch information
squillero committed Aug 23, 2023
1 parent 775c1f8 commit 969cd43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions byron/randy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import math
from functools import lru_cache
from typing import Any
from typing import Any, Optional
from collections.abc import Sequence, Iterable

import numpy as np
Expand Down Expand Up @@ -41,7 +41,7 @@ def __setstate__(self, state):
_calls = state[1]
assert self._save_state()

def __init__(self, seed: Any | None = None) -> None:
def __init__(self, seed: Optional = None) -> None:
self._generator = np.random.default_rng(seed)
self._calls = 0
# with open(Randy.LOG_FILENAME, 'a') as fout:
Expand Down Expand Up @@ -86,7 +86,7 @@ def _check_saved_state(self) -> bool:
), "State Error (paranoia check): internal generator has been modified"
return True

def seed(self, seed: Any | None = None) -> None:
def seed(self, seed: Optional = None) -> None:
assert (
seed is not None
or notebook_mode
Expand Down
3 changes: 2 additions & 1 deletion byron/user_messages/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

from numbers import Number
from collections.abc import Collection
from typing import Optional

from .messaging import logger
from .exception import *
Expand Down Expand Up @@ -76,7 +77,7 @@ def check_valid_types(obj, *valid_types: type, subclass: bool = False) -> bool:
raise ByronError(PARANOIA_TYPE_ERROR)


def check_value_range(val: Number, min_: Number | None = None, max_: Number | None = None) -> bool:
def check_value_range(val: Number, min_: Optional[Number] = None, max_: Optional[Number] = None) -> bool:
"""Checks that `val` is in the half-open range [min_, max_)."""
if min_ is not None and val < min_:
logger.error("ValueError: %s < %s (min)", repr(val), repr(min_))
Expand Down

0 comments on commit 969cd43

Please sign in to comment.