chore(ci): bump pylint to 2.10.2 (#16463)

This commit is contained in:
Ville Brofeldt
2021-08-26 20:30:41 +03:00
committed by GitHub
parent 577ede4b12
commit ac1d779a30
26 changed files with 36 additions and 39 deletions

View File

@@ -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(

View File

@@ -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")

View File

@@ -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", "")