From 7eef60d303bc27d46f2fc57c69c247241dc46106 Mon Sep 17 00:00:00 2001 From: Caleb Evans Date: Sun, 18 Feb 2024 16:55:44 -0800 Subject: [PATCH] Update dev dependencies to latest versions --- automata/base/config.py | 1 - automata/fa/dfa.py | 8 +++++--- automata/fa/gnfa.py | 24 ++++++++++++------------ requirements.txt | 10 +++++----- 4 files changed, 22 insertions(+), 21 deletions(-) diff --git a/automata/base/config.py b/automata/base/config.py index 53560ca7..5d908d2f 100644 --- a/automata/base/config.py +++ b/automata/base/config.py @@ -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 diff --git a/automata/fa/dfa.py b/automata/fa/dfa.py index d6f8ad90..d23bcb80 100644 --- a/automata/fa/dfa.py +++ b/automata/fa/dfa.py @@ -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) diff --git a/automata/fa/gnfa.py b/automata/fa/gnfa.py index 88d876cf..9770c792 100644 --- a/automata/fa/gnfa.py +++ b/automata/fa/gnfa.py @@ -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 @@ -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( diff --git a/requirements.txt b/requirements.txt index c6a2575d..61c18dee 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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