From 0c3c1668364a3ac52ab4afab52590159e108cc96 Mon Sep 17 00:00:00 2001 From: jcserv Date: Thu, 6 Feb 2025 21:04:28 -0500 Subject: [PATCH] tweak: add @ to allowed symbols --- src/gitingest/query_parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gitingest/query_parser.py b/src/gitingest/query_parser.py index be8602f2..8fa1648e 100644 --- a/src/gitingest/query_parser.py +++ b/src/gitingest/query_parser.py @@ -375,7 +375,7 @@ def _is_valid_pattern(pattern: str) -> bool: This function checks if the pattern contains only alphanumeric characters or one of the following allowed characters: dash (`-`), underscore (`_`), dot (`.`), - forward slash (`/`), plus (`+`), or asterisk (`*`). + forward slash (`/`), plus (`+`), asterisk (`*`), or the at sign (`@`). Parameters ---------- @@ -387,7 +387,7 @@ def _is_valid_pattern(pattern: str) -> bool: bool True if the pattern is valid, otherwise False. """ - return all(c.isalnum() or c in "-_./+*" for c in pattern) + return all(c.isalnum() or c in "-_./+*@" for c in pattern) async def try_domains_for_user_and_repo(user_name: str, repo_name: str) -> str: