Commit 23e552bc authored by Jan Reimes's avatar Jan Reimes
Browse files

style(models, cli, operations, tests): remove unnecessary blank lines and add noqa comments

* Removed blank lines in models.py, crawl.py, and operations/crawl.py for cleaner code.
* Added noqa comments to password assertions in test_credentials.py to suppress linting warnings.
parent e0b0f05a
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -137,7 +137,6 @@ class WorkspaceMember:
        return result



class DocumentClassification(BaseModel):
    """Classification of a file within a TDoc folder."""

+0 −1
Original line number Diff line number Diff line
@@ -44,7 +44,6 @@ from tdoc_crawler.cli.args import (
    WorkersOption,
    WorkingGroupOption,
)
from tdoc_crawler.cli.config import load_cli_config
from tdoc_crawler.cli.formatting import format_output
from tdoc_crawler.cli.printing import print_spec_crawl_table, spec_crawl_to_dict
from tdoc_crawler.config import CacheManager, TDocCrawlerConfig
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ from datetime import date
from typing import Any

from pool_executors import create_executor

from tdoc_crawler.database import TDocDatabase
from tdoc_crawler.logging import get_logger
from tdoc_crawler.meetings.models import MeetingMetadata, MeetingQueryConfig
+8 −8
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ class TestCredentialsWithConfig:

        assert result is not None
        assert result.username == "config_user"
        assert result.password == "config_pass"
        assert result.password == "config_pass" # noqa: S105

    def test_resolve_cli_overrides_config(self) -> None:
        """CLI parameters take precedence over credentials_config."""
@@ -32,7 +32,7 @@ class TestCredentialsWithConfig:
        )

        assert result.username == "cli_user"
        assert result.password == "cli_pass"
        assert result.password == "cli_pass" # noqa: S105

    def test_resolve_config_overrides_env(self, monkeypatch: pytest.MonkeyPatch) -> None:
        """credentials_config takes precedence over env vars."""
@@ -44,7 +44,7 @@ class TestCredentialsWithConfig:

        # Config should win over env
        assert result.username == "config_user"
        assert result.password == "config_pass"
        assert result.password == "config_pass" # noqa: S105

    def test_resolve_env_when_no_config(self, monkeypatch: pytest.MonkeyPatch) -> None:
        """Without credentials_config, falls back to env vars."""
@@ -54,7 +54,7 @@ class TestCredentialsWithConfig:
        result = resolve_credentials()

        assert result.username == "env_user"
        assert result.password == "env_pass"
        assert result.password == "env_pass" # noqa: S105

    def test_resolve_returns_none_when_no_creds(self, monkeypatch: pytest.MonkeyPatch) -> None:
        """Returns None when no credentials found anywhere."""
@@ -94,7 +94,7 @@ class TestCredentialsResolutionOrder:

        # CLI should win
        assert result.username == "cli_user"
        assert result.password == "cli_pass"
        assert result.password == "cli_pass" # noqa: S105

    def test_config_beats_env(self, monkeypatch: pytest.MonkeyPatch) -> None:
        """Config values should override env vars."""
@@ -105,7 +105,7 @@ class TestCredentialsResolutionOrder:
        result = resolve_credentials(credentials_config=config)

        assert result.username == "config_user"
        assert result.password == "config_pass"
        assert result.password == "config_pass" # noqa: S105

    def test_env_beats_prompt(self, monkeypatch: pytest.MonkeyPatch) -> None:
        """Env vars should prevent prompting."""
@@ -134,7 +134,7 @@ class TestCredentialsBackwardCompatibility:

        assert result is not None
        assert result.username == "legacy_user"
        assert result.password == "legacy_pass"
        assert result.password == "legacy_pass" # noqa: S105

    def test_resolve_with_cli_only(self, monkeypatch: pytest.MonkeyPatch) -> None:
        """CLI-only credentials still work."""
@@ -146,4 +146,4 @@ class TestCredentialsBackwardCompatibility:

        assert result is not None
        assert result.username == "direct_user"
        assert result.password == "direct_pass"
        assert result.password == "direct_pass" # noqa: S105