def run(self, args): if len(args) >= 1 and 'reset' == args[0]: if len(args) >= 2: highlight_type = self.get_highlight_type(args[1]) else: highlight_type = self.debugger.settings[self.name] if not highlight_type: return clear_file_format_cache() elif len(args) == 0: highlight_type = 'plain' else: highlight_type = self.get_highlight_type(args[0]) if not highlight_type: return if 'off' == highlight_type: highlight_type = 'plain' else: clear_file_format_cache() pass self.debugger.settings[self.name] = highlight_type if highlight_type in ('dark', 'light'): color_tf.bg = highlight_type self.proc.set_prompt() show_cmd = self.proc.commands['show'] show_cmd.run(['show', self.name]) return
def run(self, args): if len(args) >= 1 and "reset" == args[0]: if len(args) >= 2: highlight_type = self.get_highlight_type(args[1]) else: highlight_type = self.debugger.settings[self.name] if not highlight_type: return clear_file_format_cache() elif len(args) == 0: highlight_type = "plain" else: highlight_type = self.get_highlight_type(args[0]) if not highlight_type: return if "off" == highlight_type: highlight_type = "plain" else: clear_file_format_cache() pass self.debugger.settings[self.name] = highlight_type if highlight_type in ("dark", "light"): color_tf.bg = highlight_type self.proc.set_prompt() show_cmd = self.proc.commands["show"] show_cmd.run(["show", self.name]) return
def run(self, args): if len(args) >= 1 and 'reset' == args[0]: highlight_type = self.get_highlight_type(args[1]) if not highlight_type: return clear_file_format_cache() else: highlight_type = self.get_highlight_type(args[0]) if not highlight_type: return if 'off' == highlight_type: highlight_type = 'plain' pass self.debugger.settings['highlight'] = highlight_type show_cmd = self.proc.commands['show'] show_cmd.run(['show', 'highlight']) return
def run(self, args): if len(args) >= 1 and 'reset' == args[0]: if len(args) >= 2: highlight_type = self.get_highlight_type(args[1]) else: highlight_type = self.debugger.settings[self.name] if not highlight_type: return clear_file_format_cache() elif len(args) == 0: highlight_type = 'plain' else: highlight_type = self.get_highlight_type(args[0]) if not highlight_type: return if 'off' == highlight_type: highlight_type = 'plain' pass self.debugger.settings[self.name] = highlight_type if highlight_type in ('dark', 'light'): color_tf.bg = highlight_type self.proc.set_prompt() show_cmd = self.proc.commands['show'] show_cmd.run(['show', self.name]) return
def test_clear_file_cache(self): pyficache.update_cache(__file__) pyficache.clear_file_format_cache() pyficache.clear_file_cache() self.assertEqual([], pyficache.cached_files()) return