Skip to content

Commit bf3783c

Browse files
ShahanaFarooquirustyrussell
authored andcommitted
tests: removed lightning- prefix from autogenerate example
1 parent 2a8cc35 commit bf3783c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/autogenerate-rpc-examples.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ def update_examples_in_schema_files():
367367
for method, method_examples in EXAMPLES_JSON.items():
368368
try:
369369
global CWD
370-
file_path = os.path.join(CWD, 'doc', 'schemas', f'lightning-{method}.json') if method != 'sql' else os.path.join(CWD, 'doc', 'schemas', f'lightning-{method}-template.json')
370+
file_path = os.path.join(CWD, 'doc', 'schemas', f'{method}.json') if method != 'sql' else os.path.join(CWD, 'doc', 'schemas', f'{method}-template.json')
371371
logger.info(f'Updating examples for {method} in file {file_path}')
372372
with open(file_path, 'r+', encoding='utf-8') as file:
373373
data = json.load(file)
@@ -2081,7 +2081,7 @@ def list_missing_examples():
20812081
for file_name in os.listdir('doc/schemas'):
20822082
if not file_name.endswith('.json'):
20832083
continue
2084-
file_name_str = str(file_name).replace('lightning-', '').replace('.json', '')
2084+
file_name_str = str(file_name).replace('.json', '')
20852085
# Log an error if the method is not in the list
20862086
if file_name_str not in ALL_RPC_EXAMPLES and file_name_str not in IGNORE_RPCS_LIST:
20872087
missing_examples = missing_examples + f"'{file_name_str}', "

0 commit comments

Comments
 (0)