Skip to content

Commit 932bfb8

Browse files
committed
fix function typo and name
1 parent c45737e commit 932bfb8

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

ci/src/_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242

4343
def plugin_reader() -> P:
44-
plugin_files = get_plugin_files()
44+
plugin_files = get_plugin_file_paths()
4545

4646
manifests = []
4747

@@ -52,11 +52,11 @@ def plugin_reader() -> P:
5252

5353
return manifests
5454

55-
def get_plugin_files() -> list[str]:
55+
def get_plugin_file_paths() -> list[str]:
5656
return [os.path.join(plugin_dir, filename) for filename in get_plugin_filenames()]
5757

5858
def get_plugin_filenames() -> list[str]:
59-
return [file for file in os.listdir(plugin_dir)]
59+
return os.listdir(plugin_dir)
6060

6161
def etag_reader() -> ETagsType:
6262
with open(etag_file, "r", encoding="utf-8") as f:

ci/src/validator.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# -*-coding: utf-8 -*-
2-
from _utils import clean, id_name, language_list, language_name, plugin_reader, check_url, icon_path, get_plugin_files, get_plugin_filenames
2+
import re
3+
import uuid
4+
5+
from _utils import (check_url, clean, get_file_plugins_json_info, get_plugin_file_paths, get_plugin_filenames,
6+
icon_path, id_name, language_list, language_name, plugin_reader)
37

48
plugin_infos = plugin_reader()
59

@@ -25,7 +29,7 @@ def test_valid_icon_url():
2529
assert check_url(plugin[icon_path]), msg
2630

2731
def test_file_type_json():
28-
incorrect_ext_files = [file for file in get_plugin_files() if not file.endswith(".json")]
32+
incorrect_ext_files = [file_path for file_path in get_plugin_file_paths() if not file_path.endswith(".json")]
2933

3034
assert len(incorrect_ext_files) == 0, f"Expected the following file to be of .json extension: {incorrect_ext_files}"
3135

0 commit comments

Comments
 (0)