Skip to content

Commit 5c01b40

Browse files
committed
address lints
1 parent da7c8a2 commit 5c01b40

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

hypothesis-python/src/hypothesis/internal/conjecture/pareto.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from collections.abc import Iterator
1212
from enum import Enum
1313
from random import Random
14-
from typing import TYPE_CHECKING, Callable, Optional, Union, cast
14+
from typing import TYPE_CHECKING, Callable, Optional, Union
1515

1616
from sortedcontainers import SortedList
1717

@@ -154,7 +154,7 @@ def add(self, data: Union[ConjectureData, ConjectureResult, _Overrun]) -> bool:
154154

155155
assert not isinstance(data, _Overrun)
156156
data = data.as_result()
157-
data = cast(ConjectureResult, data)
157+
assert not isinstance(data, _Overrun)
158158

159159
if not self.front:
160160
self.front.add(data)

hypothesis-python/src/hypothesis/strategies/_internal/random.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class HypothesisRandom(Random, abc.ABC):
2929
"""A subclass of Random designed to expose the seed it was initially
3030
provided with."""
3131

32-
def __init__(self, note_method_calls: bool) -> None:
32+
def __init__(self, *, note_method_calls: bool) -> None:
3333
self._note_method_calls = note_method_calls
3434

3535
def __deepcopy__(self, table):
@@ -179,7 +179,7 @@ def normalize_zero(f: float) -> float:
179179
class ArtificialRandom(HypothesisRandom):
180180
VERSION = 10**6
181181

182-
def __init__(self, note_method_calls: bool, data: ConjectureData) -> None:
182+
def __init__(self, *, note_method_calls: bool, data: ConjectureData) -> None:
183183
super().__init__(note_method_calls=note_method_calls)
184184
self.__data = data
185185
self.__state = RandomState()
@@ -397,7 +397,7 @@ def convert_kwargs(name, kwargs):
397397

398398
class TrueRandom(HypothesisRandom):
399399
def __init__(self, seed, note_method_calls):
400-
super().__init__(note_method_calls)
400+
super().__init__(note_method_calls=note_method_calls)
401401
self.__seed = seed
402402
self.__random = Random(seed)
403403

@@ -433,7 +433,7 @@ def setstate(self, state):
433433

434434

435435
class RandomStrategy(SearchStrategy[HypothesisRandom]):
436-
def __init__(self, note_method_calls: bool, use_true_random: bool) -> None:
436+
def __init__(self, *, note_method_calls: bool, use_true_random: bool) -> None:
437437
self.__note_method_calls = note_method_calls
438438
self.__use_true_random = use_true_random
439439

0 commit comments

Comments
 (0)