Skip to content

Commit baae2c7

Browse files
committed
ref(pipeline): Move None out of ApiPipelineSteps type
Refs [VDY-32: Migrate integration setup pipelines to API-driven flows](https://linear.app/getsentry/issue/VDY-32/migrate-integration-setup-pipelines-to-api-driven-flows)
1 parent 876b9a5 commit baae2c7

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/sentry/integrations/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ def get_pipeline_views(
312312
"""
313313
raise NotImplementedError
314314

315-
def get_pipeline_api_steps(self) -> ApiPipelineSteps[IntegrationPipeline]:
315+
def get_pipeline_api_steps(self) -> ApiPipelineSteps[IntegrationPipeline] | None:
316316
"""
317317
Return API step objects for this provider's pipeline, or None if API
318318
mode is not supported. Override to enable the pipeline API for this

src/sentry/integrations/pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def get_pipeline_views(
172172
]:
173173
return self.provider.get_pipeline_views()
174174

175-
def get_pipeline_api_steps(self) -> ApiPipelineSteps[IntegrationPipeline]:
175+
def get_pipeline_api_steps(self) -> ApiPipelineSteps[IntegrationPipeline] | None:
176176
return self.provider.get_pipeline_api_steps()
177177

178178
def get_analytics_event(self) -> analytics.Event | None:

src/sentry/pipeline/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def fetch_state(self, key: str | None = None) -> Any | None:
260260
return nested_pipeline.fetch_state(key)
261261
return self._fetch_state(key)
262262

263-
def get_pipeline_api_steps(self) -> ApiPipelineSteps[Self]:
263+
def get_pipeline_api_steps(self) -> ApiPipelineSteps[Self] | None:
264264
"""
265265
Return API step objects for this pipeline, or None if API mode is not
266266
supported. Steps may be callables for late binding (resolved when the

src/sentry/pipeline/provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def get_pipeline_views(self) -> Sequence[PipelineView[P] | Callable[[], Pipeline
3636
>>> return [OAuthInitView(), OAuthCallbackView()]
3737
"""
3838

39-
def get_pipeline_api_steps(self) -> ApiPipelineSteps[P]:
39+
def get_pipeline_api_steps(self) -> ApiPipelineSteps[P] | None:
4040
"""
4141
Return API step objects for this provider's pipeline, or None if API
4242
mode is not supported. Override to enable the pipeline API.

src/sentry/pipeline/views/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def handle_post(
5858

5959

6060
type ApiPipelineStep[P] = ApiPipelineEndpoint[P] | Callable[[], ApiPipelineEndpoint[P]]
61-
type ApiPipelineSteps[P] = Sequence[ApiPipelineStep[P]] | None
61+
type ApiPipelineSteps[P] = Sequence[ApiPipelineStep[P]]
6262

6363

6464
def render_react_view(

0 commit comments

Comments
 (0)