Commit 639a0066 authored by Jan Reimes's avatar Jan Reimes
Browse files

fix(lint): resolve E501 PT011 B023 linter issues

parent e6e68267
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -68,7 +68,11 @@ class TDocCrawlConfig(BaseConfigModel):
        4,
        ge=1,
        le=16,
        description="Number of parallel workers. ProcessPoolExecutor (Python <3.14) has higher memory overhead than subinterpreters; consider lower worker counts on constrained systems.",
        description=(
            "Number of parallel workers. ProcessPoolExecutor (Python <3.14) "
            "has higher memory overhead than subinterpreters; "
            "consider lower worker counts on constrained systems."
        ),
    )
    overall_timeout: int | None = Field(
        None,
+3 −3
Original line number Diff line number Diff line
@@ -118,11 +118,11 @@ class TestRunner:
        for exec_type in executor_types:
            runner = Runner(workers=1, executor_type=exec_type)

            async def test_async() -> str:
                with runner.start() as started_runner:
            async def _execute_test(_runner: Runner) -> str:
                with _runner.start() as started_runner:
                    return await started_runner.run(simple_function)

            result = asyncio.run(test_async())
            result = asyncio.run(_execute_test(runner))
            assert result == "success"

    def test_context_manager_methods(self) -> None:
+2 −2
Original line number Diff line number Diff line
@@ -295,7 +295,7 @@ class TestExecutorType:

    def test_executor_type_invalid_raises(self) -> None:
        """Test that invalid string raises ValueError."""
        with pytest.raises(ValueError):
        with pytest.raises(ValueError, match=r"'invalid' is not a valid ExecutorType"):
            ExecutorType("invalid")


@@ -388,7 +388,7 @@ class TestFactoryCoverage:

    def test_invalid_executor_type_error_message(self) -> None:
        """Test that invalid executor type shows valid types in error."""
        with pytest.raises(ValueError) as exc_info:
        with pytest.raises(ValueError, match="Invalid executor type") as exc_info:
            create_executor("unknown")

        error_message = str(exc_info.value)