Skip to content

ref: annotate test helper create_project as returning Project #73109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/sentry/testutils/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,9 @@ def create_environment(project, **kwargs):

@staticmethod
@assume_test_silo_mode(SiloMode.REGION)
def create_project(organization=None, teams=None, fire_project_created=False, **kwargs):
def create_project(
organization=None, teams=None, fire_project_created=False, **kwargs
) -> Project:
if not kwargs.get("name"):
kwargs["name"] = petname.generate(2, " ", letters=10).title()
if not kwargs.get("slug"):
Expand Down
2 changes: 1 addition & 1 deletion tests/sentry/tasks/test_on_demand_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def organization(owner: User) -> None:


@pytest.fixture
def project(organization: Organization) -> None:
def project(organization: Organization) -> Project:
return Factories.create_project(organization=organization)


Expand Down
Loading