updade from Atlas repo

This commit is contained in:
Luciano Ramalho committed 2021-05-21 18:56:12 -03:00
1 parent c518bf851e
commit 8a330d822b
120 files changed
+2190 -1184

No files matched your search

+1 -1
View File
@@ -53,4 +53,4 @@ def test_double_nparray() -> None:
def test_double_none() -> None:
given = None
with pytest.raises(TypeError):
result = double(given)
double(given)
-1
View File
@@ -19,7 +19,6 @@ class Tombola(abc.ABC): # <1>
"""Return `True` if there's at least 1 item, `False` otherwise."""
return bool(self.inspect()) # <5>
def inspect(self):
"""Return a sorted tuple with the items currently inside."""
items = []
+1 -1
View File
@@ -3,7 +3,7 @@ from typing import Any, Iterable, TYPE_CHECKING
from randompick import RandomPicker # <1>
class SimplePicker(): # <2>
class SimplePicker: # <2>
def __init__(self, items: Iterable) -> None:
self._items = list(items)
random.shuffle(self._items)
+1 -1
View File
@@ -1,4 +1,4 @@
from typing import Protocol, runtime_checkable, Any, Iterable
from typing import Protocol, runtime_checkable
from randompick import RandomPicker
@runtime_checkable # <1>
@@ -1,9 +1,9 @@
import random
from typing import Any, Iterable, TYPE_CHECKING
from typing import Any, Iterable
from randompickload import LoadableRandomPicker
class SimplePicker():
class SimplePicker:
def __init__(self, items: Iterable) -> None:
self._items = list(items)
random.shuffle(self._items)
@@ -11,7 +11,7 @@ class SimplePicker():
def pick(self) -> Any:
return self._items.pop()
class LoadablePicker(): # <1>
class LoadablePicker: # <1>
def __init__(self, items: Iterable) -> None:
self.load(items)