Procházet zdrojové kódy

Wrap long lines in kaylee.py

Clara Hobbs před 8 roky
rodič
revize
b04dbd12cd
1 změnil soubory, kde provedl 9 přidání a 6 odebrání
  1. 9
    6
      kaylee.py

+ 9
- 6
kaylee.py Zobrazit soubor

114
         numt, nums = self.number_parser.parse_all_numbers(t)
114
         numt, nums = self.number_parser.parse_all_numbers(t)
115
         # Is there a matching command?
115
         # Is there a matching command?
116
         if t in self.commands:
116
         if t in self.commands:
117
-            # Run the valid_sentence_command if there is a valid sentence command
117
+            # Run the valid_sentence_command if it's set
118
             if self.options['valid_sentence_command']:
118
             if self.options['valid_sentence_command']:
119
-                subprocess.call(self.options['valid_sentence_command'], shell=True)
119
+                subprocess.call(self.options['valid_sentence_command'],
120
+                                shell=True)
120
             cmd = self.commands[t]
121
             cmd = self.commands[t]
121
             # Should we be passing words?
122
             # Should we be passing words?
122
             if self.options['pass_words']:
123
             if self.options['pass_words']:
124
             self.run_command(cmd)
125
             self.run_command(cmd)
125
             self.log_history(text)
126
             self.log_history(text)
126
         elif numt in self.commands:
127
         elif numt in self.commands:
127
-            # Run the valid_sentence_command if there is a valid sentence command
128
+            # Run the valid_sentence_command if it's set
128
             if self.options['valid_sentence_command']:
129
             if self.options['valid_sentence_command']:
129
-                subprocess.call(self.options['valid_sentence_command'], shell=True)
130
+                subprocess.call(self.options['valid_sentence_command'],
131
+                                shell=True)
130
             cmd = self.commands[numt]
132
             cmd = self.commands[numt]
131
             cmd = cmd.format(*nums)
133
             cmd = cmd.format(*nums)
132
             # Should we be passing words?
134
             # Should we be passing words?
135
             self.run_command(cmd)
137
             self.run_command(cmd)
136
             self.log_history(text)
138
             self.log_history(text)
137
         else:
139
         else:
138
-            # Run the invalid_sentence_command if there is an invalid sentence command
140
+            # Run the invalid_sentence_command if it's set
139
             if self.options['invalid_sentence_command']:
141
             if self.options['invalid_sentence_command']:
140
-                subprocess.call(self.options['invalid_sentence_command'], shell=True)
142
+                subprocess.call(self.options['invalid_sentence_command'],
143
+                                shell=True)
141
             print("no matching command {0}".format(t))
144
             print("no matching command {0}".format(t))
142
         # If there is a UI and we are not continuous listen
145
         # If there is a UI and we are not continuous listen
143
         if self.ui:
146
         if self.ui:

Loading…
Zrušit
Uložit