From 7e0e3eb6ac40be8b86955ae78507b134a92ca5f4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 9 Apr 2026 11:38:49 +0000 Subject: [PATCH] Fix os.makedirs to os.mkdir for single-level directory in test Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/d09883e5-f460-471d-9dcf-e64e7b96882f Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com> --- gen/apc_parsers.py | 4 ++-- kitty/parse-graphics-command.h | 1 - kitty/parse-multicell-command.h | 1 - kitty_tests/dnd.py | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/gen/apc_parsers.py b/gen/apc_parsers.py index e9ebe23fd..560202e11 100755 --- a/gen/apc_parsers.py +++ b/gen/apc_parsers.py @@ -122,6 +122,7 @@ def generate( flag_keys = parse_flag(keymap, type_map, command_class) int_keys, uint_keys = parse_number(keymap) report_cmd = cmd_for_report(report_name, keymap, type_map, payload_allowed, payload_is_base64) + post_init_line = f'\n {post_init}' if post_init else '' extra_init = '' if payload_allowed: payload_after_value = "case ';': state = PAYLOAD; break;" @@ -164,8 +165,7 @@ static inline void {extra_init} enum PARSER_STATES {{ KEY, EQUAL, UINT, INT, FLAG, AFTER_VALUE {payload} }}; enum PARSER_STATES state = KEY, value_state = FLAG; - {command_class} g = {{0}}; - {post_init} + {command_class} g = {{0}};{post_init_line} unsigned int i, code; uint64_t lcode; int64_t accumulator; bool is_negative; (void)is_negative; diff --git a/kitty/parse-graphics-command.h b/kitty/parse-graphics-command.h index b1ca23a6d..092740f80 100644 --- a/kitty/parse-graphics-command.h +++ b/kitty/parse-graphics-command.h @@ -11,7 +11,6 @@ static inline void parse_graphics_code(PS *self, uint8_t *parser_buf, enum PARSER_STATES { KEY, EQUAL, UINT, INT, FLAG, AFTER_VALUE, PAYLOAD }; enum PARSER_STATES state = KEY, value_state = FLAG; GraphicsCommand g = {0}; - unsigned int i, code; uint64_t lcode; int64_t accumulator; diff --git a/kitty/parse-multicell-command.h b/kitty/parse-multicell-command.h index a6c764a31..3b1121f41 100644 --- a/kitty/parse-multicell-command.h +++ b/kitty/parse-multicell-command.h @@ -11,7 +11,6 @@ static inline void parse_multicell_code(PS *self, uint8_t *parser_buf, enum PARSER_STATES { KEY, EQUAL, UINT, INT, FLAG, AFTER_VALUE, PAYLOAD }; enum PARSER_STATES state = KEY, value_state = FLAG; MultiCellCommand g = {0}; - unsigned int i, code; uint64_t lcode; int64_t accumulator; diff --git a/kitty_tests/dnd.py b/kitty_tests/dnd.py index acf3bca4f..237ea04f5 100644 --- a/kitty_tests/dnd.py +++ b/kitty_tests/dnd.py @@ -1108,7 +1108,7 @@ class TestDnDProtocol(BaseTest): import tempfile with tempfile.TemporaryDirectory() as root: sub = os.path.join(root, 'sub') - os.makedirs(sub) + os.mkdir(sub) with open(os.path.join(sub, 'target.txt'), 'w') as f: f.write('nested target') os.symlink('target.txt', os.path.join(sub, 'nested_link.txt'))