Skip to content

Commit

Permalink
fix(docs): black
Browse files Browse the repository at this point in the history
  • Loading branch information
dhdaines committed Aug 15, 2024
1 parent 7c38bb8 commit 2b79da2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions rustfst-python/rustfst/algorithms/compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class ComposeConfig:
matcher1_config: Matcher configuration for left-hand FST.
matcher2_config: Matcher configuration for right-hand FST.
"""

def __init__(
self,
compose_filter: ComposeFilter = ComposeFilter.AUTOFILTER,
Expand Down
1 change: 1 addition & 0 deletions rustfst-python/rustfst/algorithms/minimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class MinimizeConfig:
"""
Configuration for the minimization operation.
"""

def __init__(self, delta=None, allow_nondet=False):
if delta is None:
delta = KSHORTESTDELTA
Expand Down
6 changes: 4 additions & 2 deletions rustfst-python/rustfst/algorithms/shortest_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ class ShortestPathConfig:
unique: Return only unique label sequences
delta: Difference in weights considered significant
"""
def __init__(self, nshortest: int = 1, unique: bool = False,
delta: Union[float, None] = None):

def __init__(
self, nshortest: int = 1, unique: bool = False, delta: Union[float, None] = None
):
if delta is None:
delta = KSHORTESTDELTA
config = ctypes.pointer(ctypes.c_void_p())
Expand Down
9 changes: 6 additions & 3 deletions rustfst-python/rustfst/fst/vector_fst.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,9 @@ def copy(self) -> VectorFst:

return VectorFst(cloned_fst)

def compose(self, other: VectorFst,
config: Union[ComposeConfig, None] = None) -> VectorFst:
def compose(
self, other: VectorFst, config: Union[ComposeConfig, None] = None
) -> VectorFst:
"""
Compute composition of this Fst with another Fst, returning
the resulting Fst.
Expand Down Expand Up @@ -616,7 +617,9 @@ def rm_epsilon(self) -> VectorFst:

rm_epsilon(self)

def shortest_path(self, config: Union[ShortestPathConfig, None] = None) -> VectorFst:
def shortest_path(
self, config: Union[ShortestPathConfig, None] = None
) -> VectorFst:
"""
Construct a FST containing the shortest path of the input FST
Args:
Expand Down

0 comments on commit 2b79da2

Please sign in to comment.