Skip to content

Commit

Permalink
fix mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fschlatt committed Nov 16, 2021
1 parent 6ddbcc6 commit da91f5b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions clubs/poker/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import itertools
import operator
from timeit import default_timer as timer
from typing import Dict, Iterator, List, Optional, Tuple
from typing import Dict, Iterable, Iterator, List, Optional, Tuple

from clubs import error

Expand Down Expand Up @@ -576,9 +576,9 @@ def add_to_dict(
# if different multiples (e.g. full house) order of
# multiples is important
if len(set(multiples)) > 1:
multiple_combinations = itertools.permutations(
backwards_ranks, len(multiples)
)
multiple_combinations: Iterable[
Tuple[int, ...]
] = itertools.permutations(backwards_ranks, len(multiples))
# if same multiples (e.g. two pair) order of multiples
# is unimportant
else:
Expand Down
3 changes: 2 additions & 1 deletion clubs/render/graphic.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ def _run_flask(self) -> None:
monkey.patch_all()
import flask
import flask_socketio
import markupsafe

config: Dict[str, Any] = {}
dir_path = os.path.dirname(os.path.realpath(__file__))
Expand All @@ -124,7 +125,7 @@ def connect(): # type: ignore
@app.route("/")
def index(): # type: ignore
svg = str(self.svg_poker.base_svg)
return flask.render_template("index.html", svg=flask.Markup(svg))
return flask.render_template("index.html", svg=markupsafe.Markup(svg))

def listener() -> None:
nonlocal config
Expand Down

0 comments on commit da91f5b

Please sign in to comment.