Skip to content

Commit

Permalink
Cosmetic change
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Helwer <[email protected]>
  • Loading branch information
ahelwer committed Mar 27, 2024
1 parent 48bdc16 commit 1c2cc62
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/scripts/unicode_number_set_shim.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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):
"""
Expand All @@ -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):
"""
Expand Down

0 comments on commit 1c2cc62

Please sign in to comment.