Skip to content

type annotation has some error #20732

@asukaminato0721

Description

@asukaminato0721

Bug summary

@pytest.fixture
def dbt_runner_freshness_success(
monkeypatch: pytest.MonkeyPatch, mock_dbt_runner_freshness_success: dbtRunnerResult
) -> None:
_mock_dbt_runner_freshness_success = MagicMock(
return_value=mock_dbt_runner_freshness_success
)
monkeypatch.setattr(
"dbt.cli.main.dbtRunner.invoke", _mock_dbt_runner_freshness_success
)
return _mock_dbt_runner_freshness_success

this return a MagicMock, not None.

Version info

main branch.

Additional context

disclaim: implementing type check for pytest fixture.

related background is here.

facebook/pyrefly#2075 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueThis issue is good for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions