Skip to content

Commit

Permalink
Update dev dependencies to latest versions
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb531 committed Feb 19, 2024
1 parent f4c521b commit 7eef60d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 21 deletions.
1 change: 0 additions & 1 deletion automata/base/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Global configuration for the library and its primitives"""


should_validate_automata: bool = True
# When set to True, it disables the freeze_value step
# -> You must guarantee that your code does not modify the automata
Expand Down
8 changes: 5 additions & 3 deletions automata/fa/dfa.py
Original file line number Diff line number Diff line change
Expand Up @@ -2116,9 +2116,11 @@ def nth_from_end(
input_symbols=input_symbols,
transitions={
state: {
sym: (2 * state + 1) % state_count
if symbol == sym
else (2 * state) % state_count
sym: (
(2 * state + 1) % state_count
if symbol == sym
else (2 * state) % state_count
)
for sym in input_symbols
}
for state in range(state_count)
Expand Down
24 changes: 12 additions & 12 deletions automata/fa/gnfa.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ def from_dfa(cls: Type[Self], target_dfa: dfa.DFA) -> Self:
if state in target_dfa.transitions:
for input_symbol, to_state in target_dfa.transitions[state].items():
if to_state in gnfa_transitions.keys():
gnfa_transitions[
to_state
] = f"{gnfa_transitions[to_state]}|{input_symbol}"
gnfa_transitions[to_state] = (
f"{gnfa_transitions[to_state]}|{input_symbol}"
)
else:
gnfa_transitions[to_state] = input_symbol
new_gnfa_transitions[state] = gnfa_transitions
Expand Down Expand Up @@ -190,17 +190,17 @@ def from_nfa(cls: Type[Self], target_nfa: nfa.NFA) -> Self:
gnfa_transitions[to_state] != "" and input_symbol == ""
):
if cls._isbracket_req(gnfa_transitions[to_state]):
gnfa_transitions[
to_state
] = f"({gnfa_transitions[to_state]})?"
gnfa_transitions[to_state] = (
f"({gnfa_transitions[to_state]})?"
)
else:
gnfa_transitions[
to_state
] = f"{gnfa_transitions[to_state]}?"
gnfa_transitions[to_state] = (
f"{gnfa_transitions[to_state]}?"
)
else:
gnfa_transitions[
to_state
] = f"{gnfa_transitions[to_state]}|{input_symbol}"
gnfa_transitions[to_state] = (
f"{gnfa_transitions[to_state]}|{input_symbol}"
)
else:
gnfa_transitions[to_state] = input_symbol
new_gnfa_transitions[state] = cast(
Expand Down
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
black==23.3.0
black==24.2.0
build==1.0.3
cached_method==0.1.0
click==8.1.3
coloraide==1.8.2
coverage==6.4.4
coverage==7.4.1
flake8==7.0.0
flake8-black==0.3.6
flake8-isort==6.1.1
Flake8-pyproject==1.2.3
frozendict==2.3.4
isort==5.10.1
isort==5.13.2
mccabe==0.7.0
mypy==1.1.1
mypy==1.8.0
mypy-extensions==1.0.0
networkx==2.6.2
nose2==0.12.0
nose2==0.14.1
packaging==23.0
pathspec==0.11.1
platformdirs==3.2.0
Expand Down

1 comment on commit 7eef60d

@caleb531
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eliotwrobson Just giving you a heads up that I've updated the other dev dependencies per your suggestion.

Please sign in to comment.