Skip to content

Commit 784cd50

Browse files
committed
Merge branch '1.10.x' into release-script-alpha
2 parents 6c1a7a5 + bd8e8ea commit 784cd50

File tree

15 files changed

+22
-23
lines changed

15 files changed

+22
-23
lines changed

rasa/cli/arguments/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,6 @@ def add_no_plot_param(
191191
dest="disable_plotting",
192192
action="store_true",
193193
default=default,
194-
help=f"Don't render evaluation plots",
194+
help="Don't render evaluation plots",
195195
required=required,
196196
)

rasa/cli/export.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def _get_continuation_command(exporter: "Exporter", timestamp: float) -> Text:
220220
221221
"""
222222
# build CLI command command based on supplied timestamp and options
223-
command = f"rasa export"
223+
command = "rasa export"
224224

225225
if exporter.endpoints_path is not None:
226226
command += f" --endpoints {exporter.endpoints_path}"

rasa/cli/scaffold.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ def print_train_or_instructions(args: argparse.Namespace, path: Text) -> None:
6363
print_success(
6464
"No problem 👍🏼. You can also train a model later by going "
6565
"to the project directory and running 'rasa train'."
66-
"".format(path)
6766
)
6867

6968

@@ -103,15 +102,13 @@ def print_run_or_instructions(args: argparse.Namespace, path: Text) -> None:
103102
"If you want to speak to the assistant, "
104103
"run 'rasa shell' at any time inside "
105104
"the project directory."
106-
"".format(path)
107105
)
108106
else:
109107
print_success(
110108
"Ok 👍🏼. "
111109
"If you want to speak to the assistant, "
112110
"run 'rasa shell' at any time inside "
113111
"the project directory."
114-
"".format(path)
115112
)
116113

117114

rasa/core/exporter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ def _get_conversation_ids_in_tracker(self) -> Set[Text]:
140140
return conversation_ids_in_tracker_store
141141

142142
raise NoConversationsInTrackerStoreError(
143-
f"Could not find any conversations in connected tracker store. "
144-
f"Please validate your `endpoints.yml` and make sure the defined "
145-
f"tracker store exists. Exiting."
143+
"Could not find any conversations in connected tracker store. "
144+
"Please validate your `endpoints.yml` and make sure the defined "
145+
"tracker store exists. Exiting."
146146
)
147147

148148
def _validate_all_requested_ids_exist(

rasa/core/policies/embedding_policy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ def __init__(
162162
super().__init__(featurizer, priority, max_history, model, **kwargs)
163163

164164
common_utils.raise_warning(
165-
f"'EmbeddingPolicy' is deprecated and will be removed in version 2.0. "
166-
f"Use 'TEDPolicy' instead.",
165+
"'EmbeddingPolicy' is deprecated and will be removed in version 2.0. "
166+
"Use 'TEDPolicy' instead.",
167167
category=FutureWarning,
168168
docs=DOCS_URL_MIGRATION_GUIDE,
169169
)

rasa/core/training/story_conflict.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,7 @@ def __str__(self) -> Text:
7474
if last_event_type:
7575
conflict_message = f"Story structure conflict after {last_event_type} '{last_event_name}':\n"
7676
else:
77-
conflict_message = (
78-
f"Story structure conflict at the beginning of stories:\n"
79-
)
77+
conflict_message = "Story structure conflict at the beginning of stories:\n"
8078

8179
# List which stories are in conflict with one another
8280
for action, stories in self._conflicting_actions.items():

rasa/nlu/classifiers/diet_classifier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ def persist(self, file_name: Text, model_dir: Text) -> Dict[Text, Any]:
869869
)
870870

871871
entity_tag_specs = (
872-
[l._asdict() for l in self._entity_tag_specs]
872+
[tag_spec._asdict() for tag_spec in self._entity_tag_specs]
873873
if self._entity_tag_specs
874874
else []
875875
)

rasa/nlu/featurizers/sparse_featurizer/regex_featurizer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ def _generate_lookup_regex(
141141
if isinstance(lookup_elements, list):
142142
elements_to_regex = lookup_elements
143143
common_utils.raise_warning(
144-
f"Directly including lookup tables as a list is deprecated since Rasa "
145-
f"1.6.",
144+
"Directly including lookup tables as a list is deprecated since Rasa "
145+
"1.6.",
146146
FutureWarning,
147147
docs=DOCS_URL_TRAINING_DATA_NLU + "#lookup-tables",
148148
)

rasa/nlu/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def remove_empty_response_examples(
246246

247247
def clean_labels(labels: Iterable[Any]) -> List[Text]:
248248
"""Get rid of `None` intents. sklearn metrics do not support them."""
249-
return [l if l is not None else "" for l in labels]
249+
return [label if label is not None else "" for label in labels]
250250

251251

252252
def drop_intents_below_freq(td: TrainingData, cutoff: int = 5) -> TrainingData:

rasa/nlu/training_data/formats/markdown.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ def _parse_item(self, line: Text) -> None:
169169
def _add_item_to_lookup(self, item: Text) -> None:
170170
"""Takes a list of lookup table dictionaries. Finds the one associated
171171
with the current lookup, then adds the item to the list."""
172-
matches = [l for l in self.lookup_tables if l["name"] == self.current_title]
172+
matches = [
173+
table for table in self.lookup_tables if table["name"] == self.current_title
174+
]
173175
if not matches:
174176
self.lookup_tables.append({"name": self.current_title, "elements": [item]})
175177
else:

0 commit comments

Comments
 (0)