mirror of
https://github.com/andrewthetechie/py-healthchecks.io.git
synced 2026-05-01 19:25:55 +02:00
get flake8 passing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Schemas for integrations
|
||||
"""Schemas for integrations.
|
||||
|
||||
https://healthchecks.io/docs/api/
|
||||
"""
|
||||
from typing import Dict
|
||||
@@ -8,10 +8,13 @@ from pydantic import BaseModel
|
||||
|
||||
|
||||
class Integration(BaseModel):
|
||||
"""Schema for an integration object."""
|
||||
|
||||
id: str
|
||||
name: str
|
||||
kind: str
|
||||
|
||||
@classmethod
|
||||
def from_api_result(cls, integration_dict: Dict[str, str]) -> "Integration":
|
||||
"""Converts a dictionary from the healthchecks api into an Integration object."""
|
||||
return cls(**integration_dict)
|
||||
|
||||
Reference in New Issue
Block a user