Skip to content

Commit

Permalink
fix Sevpa type annotation for older versions of Python
Browse files Browse the repository at this point in the history
  • Loading branch information
emuskardin committed Sep 16, 2024
1 parent 1f33c5f commit 76eeadc
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions aalpy/automata/Sevpa.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import random
from collections import defaultdict, deque
from typing import Union
from typing import Union, List, Dict

from aalpy.base import Automaton, AutomatonState

from typing import List, Dict


class SevpaAlphabet:
"""
Expand Down Expand Up @@ -54,7 +52,7 @@ class SevpaState(AutomatonState):

def __init__(self, state_id, is_accepting=False):
super().__init__(state_id)
self.transitions = defaultdict(list[SevpaTransition])
self.transitions = defaultdict(List[SevpaTransition])
self.is_accepting = is_accepting


Expand Down Expand Up @@ -90,7 +88,7 @@ class Sevpa(Automaton):
"""
empty = "_"

def __init__(self, initial_state: SevpaState, states: list[SevpaState]):
def __init__(self, initial_state: SevpaState, states: List[SevpaState]):
super().__init__(initial_state, states)
self.initial_state = initial_state
self.states = states
Expand Down

0 comments on commit 76eeadc

Please sign in to comment.