File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -53,23 +53,16 @@ def __init__(self, default_dialect: str | None = None):
53
53
def _populate_keywords_and_identifiers (self ):
54
54
dialect_files = files ("jsonschema_lexer" ) / "data" / "keywords"
55
55
if not dialect_files .is_dir ():
56
- dialect_files = Path (__file__ ).parent . parent / "data" / "keywords"
56
+ dialect_files = Path (__file__ ).parent / "data" / "keywords"
57
57
for dialect_file in dialect_files .iterdir ():
58
58
with dialect_file .open () as file :
59
59
json_content = json .load (file )
60
- dialect_name = self ._make_string_double_quoted (
61
- json_content ["dialect" ],
62
- )
60
+ dialect_name = f'"{ json_content ["dialect" ]} "'
63
61
self .keywords [dialect_name ] = json_content ["keywords" ]
64
62
self .identifier [dialect_name ] = (
65
- self ._make_string_double_quoted (
66
- json_content ["identifier" ],
67
- )
63
+ f'"{ json_content ["identifier" ]} "'
68
64
)
69
65
70
- def _make_string_double_quoted (self , string : str ):
71
- return '"' + string + '"'
72
-
73
66
def _find_rightmost_token_index (
74
67
self ,
75
68
syntax_stack : list [tuple [int , str ]],
You can’t perform that action at this time.
0 commit comments