Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
uPesy authored Oct 13, 2023
2 parents a2866ef + 3151a33 commit e6c4726
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion easyeda2kicad/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def valid_arguments(arguments: dict) -> bool:
"easyeda2kicad",
)
if not os.path.isdir(default_folder):
os.mkdir(default_folder)
os.makedirs(default_folder, exist_ok=True)

base_folder = default_folder
lib_name = "easyeda2kicad"
Expand Down
6 changes: 1 addition & 5 deletions easyeda2kicad/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,7 @@ def set_logger(log_file: str, log_level: int) -> None:


def sanitize_for_regex(field: str):
field = sanitize_fields(field)
chars_to_escape = r"(){}[],;.|\+-?*#^:$"
for char in chars_to_escape:
field = field.replace(char, rf"\{char}")
return field
return re.escape(field)


def id_already_in_symbol_lib(
Expand Down

0 comments on commit e6c4726

Please sign in to comment.