Commit d85d38fd authored by Jan Reimes's avatar Jan Reimes
Browse files

🐛 fix(lint): resolve S110 bare except-pass and D417 missing docstring arg

- tdoc_app.py: replace bare except Exception: pass with logger.debug
- convert.py: add md_yaml_frontmatter to convert_for_wiki docstring
parent 84c76679
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ from dotenv import load_dotenv
load_dotenv()

import asyncio  # noqa: E402
import logging  # noqa: E402
import zipfile  # noqa: E402
from pathlib import Path  # noqa: E402
from typing import Annotated, Any, cast  # noqa: E402
@@ -43,6 +44,7 @@ from tdoc_crawler.tdocs.operations.checkout import checkout_tdoc, prepare_tdoc_f
from tdoc_crawler.tdocs.operations.fetch import fetch_missing_tdocs
from tdoc_crawler.utils.normalization import normalize_tdoc_id, normalize_tdoc_ids

logger = logging.getLogger(__name__)
tdoc_app = typer.Typer(help="3GPP Crawler - TDocs and Meetings")


@@ -308,7 +310,7 @@ def stats(
                    wiki_table.add_row(name, "[dim]no build[/dim]", "", "", "")
            console.print(wiki_table)
    except Exception:
        pass  # Registry may not be available
        logger.debug("Wiki build health not available", exc_info=True)


# Register command aliases
+1 −2
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@ from pathlib import Path
from typing import Any

import opendataloader_pdf
from rich.console import Console

from tdoc_crawler.config.settings import PathConfig
from tdoc_crawler.database.oxyde_models import Specification as OxydeSpecification
@@ -32,7 +31,6 @@ from tdoc_crawler.tdocs.sources.whatthespec import resolve_via_whatthespec
from tdoc_crawler.utils.normalization import extract_base_spec_number, extract_release_suffix, normalize_spec_number, normalize_tdoc_id

logger = logging.getLogger(__name__)
console = Console()

__all__ = [
    "ExtractedEquation",
@@ -272,6 +270,7 @@ def convert_for_wiki(
        profile: Extraction profile to use. Defaults to DEFAULT_EXTRACTION_PROFILE.
        force: Force reconversion.
        release: Release identifier for spec downloads (e.g., "19.0.0", "latest").
        md_yaml_frontmatter: Prepend YAML frontmatter with metadata to the Markdown output.

    Returns:
        Path to the primary output file (PDF for pdf-only, MD for default/advanced),