From 1c2cc627edce43141b024003bae9fa19da065add Mon Sep 17 00:00:00 2001 From: Andrew Helwer <2n8rn1w1f@mozmail.com> Date: Wed, 27 Mar 2024 16:04:25 -0400 Subject: [PATCH] Cosmetic change Signed-off-by: Andrew Helwer <2n8rn1w1f@mozmail.com> --- .github/scripts/unicode_number_set_shim.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/scripts/unicode_number_set_shim.py b/.github/scripts/unicode_number_set_shim.py index 846ae61c..66b86e5a 100644 --- a/.github/scripts/unicode_number_set_shim.py +++ b/.github/scripts/unicode_number_set_shim.py @@ -10,9 +10,8 @@ from argparse import ArgumentParser from dataclasses import dataclass import logging -from os.path import dirname, join, normpath +from os.path import dirname, normpath import tla_utils -from tree_sitter import Language, Parser logging.basicConfig(level=logging.INFO) @@ -32,7 +31,7 @@ def build_number_set_query(language): """ Builds query looking for use of number sets. """ - return language.query(' '.join([f'({shim.capture}_number_set "{shim.unicode}") @{shim.capture}' for shim in shims])) + return language.query(' '.join(f'({shim.capture}_number_set "{shim.unicode}") @{shim.capture}' for shim in shims)) def build_insertion_point_query(language): """ @@ -44,7 +43,7 @@ def get_required_defs(tree, query): """ Gets Nat/Int/Real definitions that are used in the module. """ - return set([name for _, name in query.captures(tree.root_node)]) + return set(name for _, name in query.captures(tree.root_node)) def get_def_text(required_defs): """