From 6e41409a3f10b1bba7577420cbf0a1055155a489 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 9 Jan 2023 16:51:59 +0530 Subject: [PATCH] Dont run isort on generated conf files --- kittens/diff/options/parse.py | 2 +- kittens/diff/options/types.py | 1 + kittens/ssh/options/parse.py | 2 +- kittens/ssh/options/types.py | 1 + kitty/conf/generate.py | 1 + kitty/options/parse.py | 73 ++++++++--------------------------- kitty/options/types.py | 1 + 7 files changed, 23 insertions(+), 58 deletions(-) diff --git a/kittens/diff/options/parse.py b/kittens/diff/options/parse.py index e8b6bf2f3..26ccf2d42 100644 --- a/kittens/diff/options/parse.py +++ b/kittens/diff/options/parse.py @@ -1,7 +1,7 @@ # generated by gen-config.py DO NOT edit +# isort: skip_file import typing - from kittens.diff.options.utils import parse_map, store_multiple, syntax_aliases from kitty.conf.utils import merge_dicts, positive_int, python_string, to_color, to_color_or_none diff --git a/kittens/diff/options/types.py b/kittens/diff/options/types.py index 16b40bbe9..bf33db0af 100644 --- a/kittens/diff/options/types.py +++ b/kittens/diff/options/types.py @@ -1,5 +1,6 @@ # generated by gen-config.py DO NOT edit +# isort: skip_file import typing from kitty.conf.utils import KeyAction, KittensKeyMap import kitty.conf.utils diff --git a/kittens/ssh/options/parse.py b/kittens/ssh/options/parse.py index 0bce81179..aa380f007 100644 --- a/kittens/ssh/options/parse.py +++ b/kittens/ssh/options/parse.py @@ -1,7 +1,7 @@ # generated by gen-config.py DO NOT edit +# isort: skip_file import typing - from kittens.ssh.options.utils import copy, env, hostname from kitty.conf.utils import merge_dicts, to_bool diff --git a/kittens/ssh/options/types.py b/kittens/ssh/options/types.py index a1b24068b..90ce49fc5 100644 --- a/kittens/ssh/options/types.py +++ b/kittens/ssh/options/types.py @@ -1,5 +1,6 @@ # generated by gen-config.py DO NOT edit +# isort: skip_file import typing import kittens.ssh.copy diff --git a/kitty/conf/generate.py b/kitty/conf/generate.py index e40154825..1777195c4 100644 --- a/kitty/conf/generate.py +++ b/kitty/conf/generate.py @@ -345,6 +345,7 @@ def generate_class(defn: Definition, loc: str) -> Tuple[str, str]: a = preamble.append def output_imports(imports: Set[Tuple[str, str]], add_module_imports: bool = True) -> None: + a('# isort: skip_file') a('import typing') seen_mods = {'typing'} mmap: Dict[str, List[str]] = {} diff --git a/kitty/options/parse.py b/kitty/options/parse.py index 4f1acda37..25a883c49 100644 --- a/kitty/options/parse.py +++ b/kitty/options/parse.py @@ -1,63 +1,24 @@ # generated by gen-config.py DO NOT edit +# isort: skip_file import typing - -from kitty.conf.utils import merge_dicts, positive_float, positive_int, to_bool, to_cmdline, to_color, to_color_or_none, unit_float +from kitty.conf.utils import ( + merge_dicts, positive_float, positive_int, to_bool, to_cmdline, to_color, to_color_or_none, + unit_float +) from kitty.options.utils import ( - action_alias, - active_tab_title_template, - allow_hyperlinks, - bell_on_tab, - box_drawing_scale, - clear_all_mouse_actions, - clear_all_shortcuts, - clipboard_control, - clone_source_strategies, - config_or_absolute_path, - copy_on_select, - cursor_text_color, - deprecated_adjust_line_height, - deprecated_hide_window_decorations_aliases, - deprecated_macos_show_window_title_in_menubar_alias, - deprecated_send_text, - disable_ligatures, - edge_width, - env, - font_features, - hide_window_decorations, - macos_option_as_alt, - macos_titlebar_color, - modify_font, - narrow_symbols, - optional_edge_width, - parse_map, - parse_mouse_map, - paste_actions, - remote_control_password, - resize_draw_strategy, - scrollback_lines, - scrollback_pager_history_size, - shell_integration, - store_multiple, - symbol_map, - tab_activity_symbol, - tab_bar_edge, - tab_bar_margin_height, - tab_bar_min_tabs, - tab_fade, - tab_font_style, - tab_separator, - tab_title_template, - titlebar_color, - to_cursor_shape, - to_font_size, - to_layout_names, - to_modifiers, - url_prefixes, - url_style, - visual_window_select_characters, - window_border_width, - window_size, + action_alias, active_tab_title_template, allow_hyperlinks, bell_on_tab, box_drawing_scale, + clear_all_mouse_actions, clear_all_shortcuts, clipboard_control, clone_source_strategies, + config_or_absolute_path, copy_on_select, cursor_text_color, deprecated_adjust_line_height, + deprecated_hide_window_decorations_aliases, deprecated_macos_show_window_title_in_menubar_alias, + deprecated_send_text, disable_ligatures, edge_width, env, font_features, hide_window_decorations, + macos_option_as_alt, macos_titlebar_color, modify_font, narrow_symbols, optional_edge_width, + parse_map, parse_mouse_map, paste_actions, remote_control_password, resize_draw_strategy, + scrollback_lines, scrollback_pager_history_size, shell_integration, store_multiple, symbol_map, + tab_activity_symbol, tab_bar_edge, tab_bar_margin_height, tab_bar_min_tabs, tab_fade, + tab_font_style, tab_separator, tab_title_template, titlebar_color, to_cursor_shape, to_font_size, + to_layout_names, to_modifiers, url_prefixes, url_style, visual_window_select_characters, + window_border_width, window_size ) diff --git a/kitty/options/types.py b/kitty/options/types.py index f743582fd..ef7b2de7a 100644 --- a/kitty/options/types.py +++ b/kitty/options/types.py @@ -1,5 +1,6 @@ # generated by gen-config.py DO NOT edit +# isort: skip_file import typing from array import array from kitty.constants import is_macos