MCPcopy Create free account
hub / github.com/TimMcCool/scratchattach / __init__

Method __init__

scratchattach/cloud/cloud.py:125–137  ·  view source on GitHub ↗
(self, *, project_id, cloud_host, **kwargs)

Source from the content-addressed store, hash-verified

123
124class CustomCloud(BaseCloud):
125 def __init__(self, *, project_id, cloud_host, **kwargs):
126 super().__init__()
127
128 self.project_id = project_id
129 self.cloud_host = cloud_host
130
131 # Configure this object's attributes specifically for the cloud that the developer wants to connect to:
132 # -> For this purpose, all additional keyword arguments (kwargs) will be set as attributes of the CustomCloud object
133 # This allows the maximum amount of attribute customization
134 # See the docstring for the cloud._base.BaseCloud class to find out what attributes can be set / specified as keyword args
135 self.__dict__.update(kwargs)
136
137 # If even more customization is needed, the developer can create a class inheriting from cloud._base.BaseCloud to override functions like .set_var etc.
138
139
140def get_cloud(project_id, *, CloudClass: type[BaseCloud] = ScratchCloud) -> BaseCloud:

Callers

nothing calls this directly

Calls 2

__init__Method · 0.45
updateMethod · 0.45

Tested by

no test coverage detected