From c3abb83fc8d45ad206d25dd18537b7ff10b3196d Mon Sep 17 00:00:00 2001 From: yusyus Date: Sun, 15 Feb 2026 20:37:02 +0300 Subject: [PATCH] fix: Use Optional[] for forward reference type union (Python 3.10 compat) - Changed 'pathspec.PathSpec' | None to Optional['pathspec.PathSpec'] - Fixes TypeError in Python 3.10/3.11 where | operator doesn't work with string literals - Adds Optional to typing imports --- src/skill_seekers/cli/github_scraper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/skill_seekers/cli/github_scraper.py b/src/skill_seekers/cli/github_scraper.py index 08301bc..985daa4 100644 --- a/src/skill_seekers/cli/github_scraper.py +++ b/src/skill_seekers/cli/github_scraper.py @@ -21,7 +21,7 @@ import os import re import sys from pathlib import Path -from typing import Any +from typing import Any, Optional try: from github import Github, GithubException, Repository @@ -563,7 +563,7 @@ class GitHubScraper: return False - def _load_gitignore(self) -> "pathspec.PathSpec" | None: + def _load_gitignore(self) -> Optional["pathspec.PathSpec"]: """ Load .gitignore file and create pathspec matcher (C2.1).