diff --git a/api/internal/service/api.go b/api/internal/service/api.go index 0c1a5e8..db2f938 100644 --- a/api/internal/service/api.go +++ b/api/internal/service/api.go @@ -28,7 +28,7 @@ type Service struct { Storage storage.Provider } -func (s *Service) GetWorkerConfig(_ context.Context, _ *empty.Empty) (*api.ConfigResponse, error) { +func (s *Service) GetWorkerConfig(_ context.Context, _ *emptypb.Empty) (*api.ConfigResponse, error) { type WorkerTask struct { Name string `json:"name"` Source string `json:"source,omitempty"` diff --git a/api/internal/service/api_test.go b/api/internal/service/api_test.go index 6b4e5fb..5c05456 100644 --- a/api/internal/service/api_test.go +++ b/api/internal/service/api_test.go @@ -920,7 +920,7 @@ func TestSaveMediaItemPeople(t *testing.T) { }, { "save mediaitem people with invalid face id", - &api.MediaItemPeopleRequest{UserId: "4d05b5f6-17c2-475e-87fe-3fc8b9567179", MediaItemFacePeople: map[string]*api.MediaItemFacePeople{"4d05b5f6-17c2-475e-87fe-3fc8b9567179": &api.MediaItemFacePeople{ + &api.MediaItemPeopleRequest{UserId: "4d05b5f6-17c2-475e-87fe-3fc8b9567179", MediaItemFacePeople: map[string]*api.MediaItemFacePeople{"4d05b5f6-17c2-475e-87fe-3fc8b9567179": { FacePeople: map[string]string{"bad-face-id": "bad-people-id"}, }}}, nil, diff --git a/worker/.pylintrc b/worker/.pylintrc index bf72e39..6b2e10c 100644 --- a/worker/.pylintrc +++ b/worker/.pylintrc @@ -1,7 +1,7 @@ [MASTER] ignore=tests ignore-patterns=.*_pb2.py,.*_grpc.py,.*.txt,.*file,.*.toml,.*.xml,.*.md -disable=too-few-public-methods,logging-fstring-interpolation,broad-except,import-outside-toplevel +disable=too-few-public-methods,logging-fstring-interpolation,broad-except,import-outside-toplevel,too-many-boolean-expressions generated-members=fastdeploy.*,cv2.* [FORMAT] max-line-length=120 \ No newline at end of file diff --git a/worker/src/components/metadata.py b/worker/src/components/metadata.py index 57d2d17..3ab53d9 100644 --- a/worker/src/components/metadata.py +++ b/worker/src/components/metadata.py @@ -111,7 +111,6 @@ async def process(self, mediaitem_user_id: str, mediaitem_id: str, mediaitem_fil result['latitude'] = getval_from_dict(metadata, ['Composite:GPSLatitude'], return_type='float') result['longitude'] = getval_from_dict(metadata, ['Composite:GPSLongitude'], return_type='float') if result['latitude'] is None or result['longitude'] is None: - # pylint: disable=too-many-boolean-expressions if 'EXIF:GPSLatitudeRef' in metadata and 'EXIF:GPSLatitude' in metadata and \ 'EXIF:GPSLongitudeRef' in metadata and 'EXIF:GPSLongitude' in metadata and \ metadata['EXIF:GPSLatitudeRef'] != '' and metadata['EXIF:GPSLatitude'] != '' and \