From b13464629ea0b77cb1b0d4c77bc518efba315151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Schoentgen?= Date: Mon, 26 Aug 2024 22:58:01 +0200 Subject: [PATCH] chore: remove unused file --- tools/dump_fsevents_constants.py | 40 -------------------------------- 1 file changed, 40 deletions(-) delete mode 100755 tools/dump_fsevents_constants.py diff --git a/tools/dump_fsevents_constants.py b/tools/dump_fsevents_constants.py deleted file mode 100755 index 5d0931559..000000000 --- a/tools/dump_fsevents_constants.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -import sys -from io import StringIO - -import FSEvents # type: ignore - -header = """ File generated by watchdog/scripts/dump_mac_constants.py - -class Constants: -""" - - -def dump_constants(header): - output = StringIO() - output.write(header) - - for attribute in dir(FSEvents): - value = getattr(FSEvents, attribute) - if attribute.startswith("k") and isinstance(value, int): - output.write(f" {attribute} = {hex(value)}\n") - content = output.getvalue() - output.close() - return content - - -def write_constants_to_file(filename): - content = dump_constants(header) - with open(filename, "wb") as f: - f.write(content) - - -if __name__ == "__main__": - if len(sys.argv) > 1: - output_file = sys.argv[1] - else: - print("Usage: scripts/dump_mac_constants.py ") - sys.exit(1) - - write_constants_to_file(output_file)