Skip to content

Commit 4a66a8e

Browse files
committed
removed pre_processor for pyttman cli
1 parent 6e2ddf9 commit 4a66a8e

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

pyttman/tools/pyttmancli/intents.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ class ShellMode(Intent, PyttmanCliComplainerMixin):
2929
example = "pyttman shell <app name>"
3030
help_string = "Opens a Python interactive shell with access to modules, " \
3131
"app settings and the Pyttman 'app' object."
32-
app_name = TextEntityField(default="",
33-
pre_processor=lambda x: re.sub("[^a-zA-Z0-9_]", "", x))
32+
app_name = TextEntityField(default="")
3433

3534
def respond(self, message: Message) -> Reply | ReplyStream:
3635
app_name = message.entities["app_name"]
@@ -50,8 +49,7 @@ class CreateNewApp(Intent, PyttmanCliComplainerMixin):
5049
Create a new Pyttman app. The directory is terraformed
5150
and prepared with a template project.
5251
"""
53-
app_name = TextEntityField(default="",
54-
pre_processor=lambda x: re.sub("[^a-zA-Z0-9_]", "", x))
52+
app_name = TextEntityField(default="")
5553
lead = ("new",)
5654
trail = ("app",)
5755
ordered = True
@@ -107,8 +105,7 @@ class RunAppInDevMode(Intent, PyttmanCliComplainerMixin):
107105
Run a Pyttman app in dev mode. This sets "DEV_MODE"
108106
to True and opens a chat interface in the terminal.
109107
"""
110-
app_name = TextEntityField(default="",
111-
pre_processor=lambda x: re.sub("[^a-zA-Z0-9_]", "", x))
108+
app_name = TextEntityField(default="")
112109
fail_gracefully = True
113110
lead = ("dev",)
114111
example = "pyttman dev <app name>"
@@ -151,8 +148,7 @@ class RunAppInClientMode(Intent, PyttmanCliComplainerMixin):
151148
"settings.py under 'CLIENT'.\n" \
152149
f"Example: {example}"
153150

154-
app_name = TextEntityField(default="",
155-
pre_processor=lambda x: re.sub("[^a-zA-Z0-9_]", "", x))
151+
app_name = TextEntityField(default="")
156152

157153
def respond(self, message: Message) -> Reply | ReplyStream:
158154
app_name = message.entities["app_name"]
@@ -182,8 +178,7 @@ class RunFile(Intent, PyttmanCliComplainerMixin):
182178
help_string = "Run a singe file within a Pyttman app context. " \
183179
f"Example: {example}"
184180

185-
app_name = TextEntityField(default="",
186-
pre_processor=lambda x: re.sub("[^a-zA-Z0-9_]", "", x))
181+
app_name = TextEntityField(default="")
187182
script_file_name = TextEntityField(prefixes=(app_name,))
188183

189184
def respond(self, message: Message) -> Reply | ReplyStream:

0 commit comments

Comments
 (0)