Skip to content

Commit

Permalink
ci: Use Black for pre-commit (#343) (#339)
Browse files Browse the repository at this point in the history
* ci: Use Black for pre-commit

* ci: Fixed commitize version

* docs: formatted code
  • Loading branch information
expobrain authored Dec 4, 2023
1 parent 52a6cbe commit 1796d4d
Show file tree
Hide file tree
Showing 21 changed files with 274 additions and 264 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# incident_io_client.api.audit_logs.audit_logs_post_incident_task_created_v1

::: incident_io_client.api.audit_logs.audit_logs_post_incident_task_created_v1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# incident_io_client.api.audit_logs.audit_logs_post_incident_task_deleted_v1

::: incident_io_client.api.audit_logs.audit_logs_post_incident_task_deleted_v1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# incident_io_client.api.audit_logs.audit_logs_post_incident_task_updated_v1

::: incident_io_client.api.audit_logs.audit_logs_post_incident_task_updated_v1

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# incident_io_client.models.audit_logs_post_incident_task_created_v1_response_body

::: incident_io_client.models.audit_logs_post_incident_task_created_v1_response_body
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# incident_io_client.models.audit_logs_post_incident_task_deleted_v1_response_body

::: incident_io_client.models.audit_logs_post_incident_task_deleted_v1_response_body
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# incident_io_client.models.audit_logs_post_incident_task_updated_v1_response_body

::: incident_io_client.models.audit_logs_post_incident_task_updated_v1_response_body
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

from ... import errors
from ...client import AuthenticatedClient, Client
from ...models.audit_logs_learning_task_created_v1_response_body import (
AuditLogsLearningTaskCreatedV1ResponseBody,
from ...models.audit_logs_post_incident_task_created_v1_response_body import (
AuditLogsPostIncidentTaskCreatedV1ResponseBody,
)
from ...types import Response

Expand All @@ -16,15 +16,15 @@ def _get_kwargs() -> Dict[str, Any]:

return {
"method": "get",
"url": "/x-audit-logs/learning_task.created.1",
"url": "/x-audit-logs/post_incident_task.created.1",
}


def _parse_response(
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
) -> Optional[AuditLogsLearningTaskCreatedV1ResponseBody]:
) -> Optional[AuditLogsPostIncidentTaskCreatedV1ResponseBody]:
if response.status_code == HTTPStatus.OK:
response_200 = AuditLogsLearningTaskCreatedV1ResponseBody.from_dict(response.json())
response_200 = AuditLogsPostIncidentTaskCreatedV1ResponseBody.from_dict(response.json())

return response_200
if client.raise_on_unexpected_status:
Expand All @@ -35,7 +35,7 @@ def _parse_response(

def _build_response(
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
) -> Response[AuditLogsLearningTaskCreatedV1ResponseBody]:
) -> Response[AuditLogsPostIncidentTaskCreatedV1ResponseBody]:
return Response(
status_code=HTTPStatus(response.status_code),
content=response.content,
Expand All @@ -47,17 +47,17 @@ def _build_response(
def sync_detailed(
*,
client: Union[AuthenticatedClient, Client],
) -> Response[AuditLogsLearningTaskCreatedV1ResponseBody]:
"""LearningTaskCreatedV1 Audit logs
) -> Response[AuditLogsPostIncidentTaskCreatedV1ResponseBody]:
"""PostIncidentTaskCreatedV1 Audit logs
This entry is created whenever a learning task is created
This entry is created whenever a post-incident task is created
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[AuditLogsLearningTaskCreatedV1ResponseBody]
Response[AuditLogsPostIncidentTaskCreatedV1ResponseBody]
"""

kwargs = _get_kwargs()
Expand All @@ -72,17 +72,17 @@ def sync_detailed(
def sync(
*,
client: Union[AuthenticatedClient, Client],
) -> Optional[AuditLogsLearningTaskCreatedV1ResponseBody]:
"""LearningTaskCreatedV1 Audit logs
) -> Optional[AuditLogsPostIncidentTaskCreatedV1ResponseBody]:
"""PostIncidentTaskCreatedV1 Audit logs
This entry is created whenever a learning task is created
This entry is created whenever a post-incident task is created
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
AuditLogsLearningTaskCreatedV1ResponseBody
AuditLogsPostIncidentTaskCreatedV1ResponseBody
"""

return sync_detailed(
Expand All @@ -93,17 +93,17 @@ def sync(
async def asyncio_detailed(
*,
client: Union[AuthenticatedClient, Client],
) -> Response[AuditLogsLearningTaskCreatedV1ResponseBody]:
"""LearningTaskCreatedV1 Audit logs
) -> Response[AuditLogsPostIncidentTaskCreatedV1ResponseBody]:
"""PostIncidentTaskCreatedV1 Audit logs
This entry is created whenever a learning task is created
This entry is created whenever a post-incident task is created
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[AuditLogsLearningTaskCreatedV1ResponseBody]
Response[AuditLogsPostIncidentTaskCreatedV1ResponseBody]
"""

kwargs = _get_kwargs()
Expand All @@ -116,17 +116,17 @@ async def asyncio_detailed(
async def asyncio(
*,
client: Union[AuthenticatedClient, Client],
) -> Optional[AuditLogsLearningTaskCreatedV1ResponseBody]:
"""LearningTaskCreatedV1 Audit logs
) -> Optional[AuditLogsPostIncidentTaskCreatedV1ResponseBody]:
"""PostIncidentTaskCreatedV1 Audit logs
This entry is created whenever a learning task is created
This entry is created whenever a post-incident task is created
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
AuditLogsLearningTaskCreatedV1ResponseBody
AuditLogsPostIncidentTaskCreatedV1ResponseBody
"""

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

from ... import errors
from ...client import AuthenticatedClient, Client
from ...models.audit_logs_learning_task_deleted_v1_response_body import (
AuditLogsLearningTaskDeletedV1ResponseBody,
from ...models.audit_logs_post_incident_task_deleted_v1_response_body import (
AuditLogsPostIncidentTaskDeletedV1ResponseBody,
)
from ...types import Response

Expand All @@ -16,15 +16,15 @@ def _get_kwargs() -> Dict[str, Any]:

return {
"method": "get",
"url": "/x-audit-logs/learning_task.deleted.1",
"url": "/x-audit-logs/post_incident_task.deleted.1",
}


def _parse_response(
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
) -> Optional[AuditLogsLearningTaskDeletedV1ResponseBody]:
) -> Optional[AuditLogsPostIncidentTaskDeletedV1ResponseBody]:
if response.status_code == HTTPStatus.OK:
response_200 = AuditLogsLearningTaskDeletedV1ResponseBody.from_dict(response.json())
response_200 = AuditLogsPostIncidentTaskDeletedV1ResponseBody.from_dict(response.json())

return response_200
if client.raise_on_unexpected_status:
Expand All @@ -35,7 +35,7 @@ def _parse_response(

def _build_response(
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
) -> Response[AuditLogsLearningTaskDeletedV1ResponseBody]:
) -> Response[AuditLogsPostIncidentTaskDeletedV1ResponseBody]:
return Response(
status_code=HTTPStatus(response.status_code),
content=response.content,
Expand All @@ -47,17 +47,17 @@ def _build_response(
def sync_detailed(
*,
client: Union[AuthenticatedClient, Client],
) -> Response[AuditLogsLearningTaskDeletedV1ResponseBody]:
"""LearningTaskDeletedV1 Audit logs
) -> Response[AuditLogsPostIncidentTaskDeletedV1ResponseBody]:
"""PostIncidentTaskDeletedV1 Audit logs
This entry is created whenever a learning task is deleted
This entry is created whenever a post-incident task is deleted
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[AuditLogsLearningTaskDeletedV1ResponseBody]
Response[AuditLogsPostIncidentTaskDeletedV1ResponseBody]
"""

kwargs = _get_kwargs()
Expand All @@ -72,17 +72,17 @@ def sync_detailed(
def sync(
*,
client: Union[AuthenticatedClient, Client],
) -> Optional[AuditLogsLearningTaskDeletedV1ResponseBody]:
"""LearningTaskDeletedV1 Audit logs
) -> Optional[AuditLogsPostIncidentTaskDeletedV1ResponseBody]:
"""PostIncidentTaskDeletedV1 Audit logs
This entry is created whenever a learning task is deleted
This entry is created whenever a post-incident task is deleted
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
AuditLogsLearningTaskDeletedV1ResponseBody
AuditLogsPostIncidentTaskDeletedV1ResponseBody
"""

return sync_detailed(
Expand All @@ -93,17 +93,17 @@ def sync(
async def asyncio_detailed(
*,
client: Union[AuthenticatedClient, Client],
) -> Response[AuditLogsLearningTaskDeletedV1ResponseBody]:
"""LearningTaskDeletedV1 Audit logs
) -> Response[AuditLogsPostIncidentTaskDeletedV1ResponseBody]:
"""PostIncidentTaskDeletedV1 Audit logs
This entry is created whenever a learning task is deleted
This entry is created whenever a post-incident task is deleted
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[AuditLogsLearningTaskDeletedV1ResponseBody]
Response[AuditLogsPostIncidentTaskDeletedV1ResponseBody]
"""

kwargs = _get_kwargs()
Expand All @@ -116,17 +116,17 @@ async def asyncio_detailed(
async def asyncio(
*,
client: Union[AuthenticatedClient, Client],
) -> Optional[AuditLogsLearningTaskDeletedV1ResponseBody]:
"""LearningTaskDeletedV1 Audit logs
) -> Optional[AuditLogsPostIncidentTaskDeletedV1ResponseBody]:
"""PostIncidentTaskDeletedV1 Audit logs
This entry is created whenever a learning task is deleted
This entry is created whenever a post-incident task is deleted
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
AuditLogsLearningTaskDeletedV1ResponseBody
AuditLogsPostIncidentTaskDeletedV1ResponseBody
"""

return (
Expand Down
Loading

0 comments on commit 1796d4d

Please sign in to comment.