Skip to content

Commit

Permalink
fix: no typing.Literal in py<3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
zhudotexe committed Jul 8, 2021
1 parent f281f53 commit 1f6b13b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions d20/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import copy
from typing import Callable, Literal, Optional, TypeVar
from typing import Callable, Optional, TypeVar

import d20 # this import is here for the doctests
from d20 import diceast, expression
Expand Down Expand Up @@ -65,7 +65,7 @@ def ast_adv_copy(ast: ASTNode, advtype: AdvType) -> ASTNode:
return root


def simplify_expr_annotations(expr: ExpressionNode, ambig_inherit: Optional[Literal['left', 'right']] = None):
def simplify_expr_annotations(expr: ExpressionNode, ambig_inherit: Optional[str] = None):
"""
Transforms an expression in place by simplifying the annotations using a bubble-up method.
Expand Down

0 comments on commit 1f6b13b

Please sign in to comment.