From 7650d831e37665942b87d23c245ec0e8cac561e3 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Mon, 3 Oct 2022 18:03:06 -0700 Subject: [PATCH] add slots --- jc/cli.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/jc/cli.py b/jc/cli.py index fd16a07c..3fa8f1d8 100644 --- a/jc/cli.py +++ b/jc/cli.py @@ -54,6 +54,15 @@ if PYGMENTS_INSTALLED: class JcCli(): + __slots__ = [ + 'data_in', 'data_out', 'options', 'args', 'parser_module', 'parser_name', + 'indent', 'pad', 'env_colors', 'custom_colors', 'show_hidden', 'ascii_only', 'json_separators', + 'json_indent', 'path_string', 'jc_exit', 'JC_ERROR_EXIT', 'exit_code', 'run_timestamp', + 'about', 'debug', 'verbose_debug', 'force_color', 'mono', 'help_me', 'pretty', 'quiet', + 'ignore_exceptions', 'raw', 'meta_out', 'unbuffer', 'version_info', 'yaml_output', + 'bash_comp', 'zsh_comp', 'magic_found_parser', 'magic_options', 'magic_run_command', + 'magic_run_command_str', 'magic_stdout', 'magic_stderr', 'magic_returncode' + ] def __init__(self) -> None: self.data_in = None @@ -103,7 +112,6 @@ class JcCli(): self.magic_stderr = None self.magic_returncode = 0 - def set_custom_colors(self): """ Sets the custom_colors dictionary to be used in Pygments custom style class. @@ -312,7 +320,6 @@ Examples: ''' return textwrap.dedent(versiontext_string) - def yaml_out(self): """ Return a YAML formatted string. String may include color codes. If the