fix(epics): use actual group_id for save/delete operations on nested epics by JohnVillalovos · Pull Request #3279 · python-gitlab/python-gitlab
Args: id: ID of the object to update (can be None if not required) new_data: the update data for the object _custom_path: Optional custom path for special API endpoints **kwargs: Extra options to send to the server (e.g. sudo)
Returns:
if id is None: if _custom_path is not None: path = _custom_path elif id is None: path = self.path else: path = f"{self.path}/{utils.EncodedId(id)}"
class DeleteMixin(base.RESTManager[base.TObjCls]): @exc.on_http_error(exc.GitlabDeleteError) def delete(self, id: str | int | None = None, **kwargs: Any) -> None: def delete( self, id: str | int | None = None, *, _custom_path: str | None = None, **kwargs: Any, ) -> None: """Delete an object on the server.
Args: id: ID of the object to delete _custom_path: Optional custom path for special API endpoints **kwargs: Extra options to send to the server (e.g. sudo)
Raises: GitlabAuthenticationError: If authentication is not correct GitlabDeleteError: If the server cannot perform the request """ if id is None: if _custom_path is not None: path = _custom_path elif id is None: path = self.path else: path = f"{self.path}/{utils.EncodedId(id)}"
def _get_custom_path(self) -> str | None: # NOTE(jlvillal): pylint will complain for the callers with an # 'assignment-from-none' error, if we don't do this. custom_path: str | None = None return custom_path
def _get_updated_data(self) -> dict[str, Any]: updated_data = {} for attr in self.manager._update_attrs.required:
def _get_custom_path(self) -> str | None: # NOTE(jlvillal): pylint will complain for the callers with an # 'assignment-from-none' error, if we don't do this. custom_path: str | None = None return custom_path
def delete(self, **kwargs: Any) -> None: """Delete the object from the server.
class UserAgentDetailMixin(_RestObjectBase):