Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new feature: fix invalid function name #1063

Merged
merged 1 commit into from
Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/scripts/build_assets/filehandler.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
from zipfile import ZipFile
from pathlib import Path
from typing import List
from typing import List, Union
import os
import re

Expand Down Expand Up @@ -78,7 +78,7 @@ def get_svgs_paths(new_icons: List[dict], icons_folder_path: str,


def get_icon_svgs_paths(folder_path: Path, icon_info: dict,
file_paths: List[str], as_str: bool):
file_paths: List[Union[str, Path]], as_str: bool):
"""
Get only the svg file paths that can be made into an icon from the icon_info.
:param: folder_path, the folder where we can find the icons.
Expand All @@ -104,7 +104,7 @@ def get_icon_svgs_paths(folder_path: Path, icon_info: dict,


def get_all_svgs_paths(folder_path: Path, icon_info: dict,
file_paths: List[str], as_str: bool):
file_paths: List[Union[str, Path]], as_str: bool):
"""
Get all the svg file paths of an icon.
:param: folder_path, the folder where we can find the icons.
Expand Down Expand Up @@ -207,7 +207,7 @@ def create_screenshot_folder(dir, screenshot_name: str="screenshots/"):
finally:
return str(screenshot_folder)

def write_to_file(path: str, value: any):
def write_to_file(path: str, value):
"""
Write the value to a file.
"""
Expand Down
4 changes: 2 additions & 2 deletions .github/scripts/check_icon_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def check_devicon_object(icon: dict):
err_msgs.append("- must contain at least 1 svg version in a list.")

for version in icon["versions"]["svg"]:
if not util.is_version_name_valid(version):
if not util.is_svg_name_valid(version):
err_msgs.append(f"- Invalid version name in versions['svg']: '{version}'. Must match regexp: (original|plain|line)(-wordmark)?")
except KeyError:
err_msgs.append("- missing key: 'svg' in 'versions'.")
Expand All @@ -92,7 +92,7 @@ def check_devicon_object(icon: dict):
err_msgs.append("- must contain at least 1 font version in a list.")

for version in icon["versions"]["font"]:
if not util.is_version_name_valid(version):
if not util.is_svg_name_valid(version):
err_msgs.append(f"- Invalid version name in versions['font']: '{version}'. Must match regexp: (original|plain|line)(-wordmark)?")
except KeyError:
err_msgs.append("- missing key: 'font' in 'versions'.")
Expand Down