mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
chore(ci): bump pylint to 2.10.2 (#16463)
This commit is contained in:
@@ -381,7 +381,7 @@ class AnnotationRestApi(BaseSupersetModelRestApi):
|
||||
try:
|
||||
new_model = UpdateAnnotationCommand(g.user, annotation_id, item).run()
|
||||
return self.response(200, id=new_model.id, result=item)
|
||||
except (AnnotationNotFoundError, AnnotationLayerNotFoundError) as ex:
|
||||
except (AnnotationNotFoundError, AnnotationLayerNotFoundError):
|
||||
return self.response_404()
|
||||
except AnnotationInvalidError as ex:
|
||||
return self.response_422(message=ex.normalized_messages())
|
||||
@@ -438,7 +438,7 @@ class AnnotationRestApi(BaseSupersetModelRestApi):
|
||||
try:
|
||||
DeleteAnnotationCommand(g.user, annotation_id).run()
|
||||
return self.response(200, message="OK")
|
||||
except AnnotationNotFoundError as ex:
|
||||
except AnnotationNotFoundError:
|
||||
return self.response_404()
|
||||
except AnnotationDeleteFailedError as ex:
|
||||
logger.error(
|
||||
|
||||
@@ -52,7 +52,7 @@ class CreateAnnotationCommand(BaseCommand):
|
||||
return annotation
|
||||
|
||||
def validate(self) -> None:
|
||||
exceptions: List[ValidationError] = list()
|
||||
exceptions: List[ValidationError] = []
|
||||
layer_id: Optional[int] = self._properties.get("layer")
|
||||
start_dttm: Optional[datetime] = self._properties.get("start_dttm")
|
||||
end_dttm: Optional[datetime] = self._properties.get("end_dttm")
|
||||
|
||||
@@ -56,7 +56,7 @@ class UpdateAnnotationCommand(BaseCommand):
|
||||
return annotation
|
||||
|
||||
def validate(self) -> None:
|
||||
exceptions: List[ValidationError] = list()
|
||||
exceptions: List[ValidationError] = []
|
||||
layer_id: Optional[int] = self._properties.get("layer")
|
||||
short_descr: str = self._properties.get("short_descr", "")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user