diff --git a/cvat-cli/requirements/development.txt b/cvat-cli/requirements/development.txt index 1b3f6ae04b26..42a144087213 100644 --- a/cvat-cli/requirements/development.txt +++ b/cvat-cli/requirements/development.txt @@ -1,5 +1,5 @@ -r base.txt -black>=22.1.0 +black>=24.1 isort>=5.10.1 pylint>=2.7.0 \ No newline at end of file diff --git a/cvat-sdk/cvat_sdk/core/proxies/annotations.py b/cvat-sdk/cvat_sdk/core/proxies/annotations.py index 96c50b692d0a..e9353888119f 100644 --- a/cvat-sdk/cvat_sdk/core/proxies/annotations.py +++ b/cvat-sdk/cvat_sdk/core/proxies/annotations.py @@ -20,8 +20,7 @@ class AnnotationCrudMixin(ABC): # TODO: refactor @property - def _put_annotations_data_param(self) -> str: - ... + def _put_annotations_data_param(self) -> str: ... def get_annotations(self: _EntityT) -> models.ILabeledData: (annotations, _) = self.api.retrieve_annotations(getattr(self, self._model_id_field)) diff --git a/cvat-sdk/cvat_sdk/core/proxies/model_proxy.py b/cvat-sdk/cvat_sdk/core/proxies/model_proxy.py index 9a761771af73..fa25035a418f 100644 --- a/cvat-sdk/cvat_sdk/core/proxies/model_proxy.py +++ b/cvat-sdk/cvat_sdk/core/proxies/model_proxy.py @@ -39,8 +39,7 @@ class ModelProxy(ABC, Generic[ModelType, ApiType]): _client: Client @property - def _api_member_name(self) -> str: - ... + def _api_member_name(self) -> str: ... def __init__(self, client: Client) -> None: self.__dict__["_client"] = client @@ -142,12 +141,10 @@ def retrieve(self: Repo, obj_id: int) -> _EntityT: class ModelListMixin(Generic[_EntityT]): @overload - def list(self: Repo, *, return_json: Literal[False] = False) -> List[_EntityT]: - ... + def list(self: Repo, *, return_json: Literal[False] = False) -> List[_EntityT]: ... @overload - def list(self: Repo, *, return_json: Literal[True] = False) -> List[Any]: - ... + def list(self: Repo, *, return_json: Literal[True] = False) -> List[Any]: ... def list(self: Repo, *, return_json: bool = False) -> List[Union[_EntityT, Any]]: """ @@ -166,8 +163,7 @@ def list(self: Repo, *, return_json: bool = False) -> List[Union[_EntityT, Any]] class ModelUpdateMixin(ABC, Generic[IModel]): @property - def _model_partial_update_arg(self: Entity) -> str: - ... + def _model_partial_update_arg(self: Entity) -> str: ... def _export_update_fields( self: Entity, overrides: Optional[Union[Dict[str, Any], IModel]] = None diff --git a/cvat-sdk/cvat_sdk/core/utils.py b/cvat-sdk/cvat_sdk/core/utils.py index 9aadd90cc8c2..0706a2eec613 100644 --- a/cvat-sdk/cvat_sdk/core/utils.py +++ b/cvat-sdk/cvat_sdk/core/utils.py @@ -29,15 +29,15 @@ def filter_dict( @overload -def atomic_writer(path: Union[os.PathLike, str], mode: Literal["wb"]) -> ContextManager[BinaryIO]: - ... +def atomic_writer( + path: Union[os.PathLike, str], mode: Literal["wb"] +) -> ContextManager[BinaryIO]: ... @overload def atomic_writer( path: Union[os.PathLike, str], mode: Literal["w"], encoding: str = "UTF-8" -) -> ContextManager[TextIO]: - ... +) -> ContextManager[TextIO]: ... @contextlib.contextmanager diff --git a/cvat-sdk/cvat_sdk/datasets/caching.py b/cvat-sdk/cvat_sdk/datasets/caching.py index deaa8abf8721..08e0c123bfe1 100644 --- a/cvat-sdk/cvat_sdk/datasets/caching.py +++ b/cvat-sdk/cvat_sdk/datasets/caching.py @@ -44,13 +44,11 @@ class UpdatePolicy(Enum): class _CacheObjectModel(metaclass=ABCMeta): @abstractmethod - def dump(self) -> _CacheObject: - ... + def dump(self) -> _CacheObject: ... @classmethod @abstractmethod - def load(cls, obj: _CacheObject): - ... + def load(cls, obj: _CacheObject): ... _ModelType = TypeVar("_ModelType", bound=Union[OpenApiModel, _CacheObjectModel]) @@ -115,8 +113,7 @@ def save_model(self, path: Path, model: _ModelType) -> None: return self._save_object(path, self._serialize_model(model)) @abstractmethod - def retrieve_task(self, task_id: int) -> Task: - ... + def retrieve_task(self, task_id: int) -> Task: ... @abstractmethod def ensure_task_model( @@ -126,16 +123,13 @@ def ensure_task_model( model_type: Type[_ModelType], downloader: Callable[[], _ModelType], model_description: str, - ) -> _ModelType: - ... + ) -> _ModelType: ... @abstractmethod - def ensure_chunk(self, task: Task, chunk_index: int) -> None: - ... + def ensure_chunk(self, task: Task, chunk_index: int) -> None: ... @abstractmethod - def retrieve_project(self, project_id: int) -> Project: - ... + def retrieve_project(self, project_id: int) -> Project: ... class _CacheManagerOnline(CacheManager): diff --git a/cvat-sdk/gen/requirements.txt b/cvat-sdk/gen/requirements.txt index f20a92b8e6b4..18f397e59dc6 100644 --- a/cvat-sdk/gen/requirements.txt +++ b/cvat-sdk/gen/requirements.txt @@ -1,6 +1,5 @@ # can't have a dependency on base.txt, because it depends on the generated file -black>=22.1.0 inflection >= 0.5.1 isort>=5.10.1 ruamel.yaml>=0.17.21 diff --git a/cvat/apps/analytics_report/report/primary_metrics/base.py b/cvat/apps/analytics_report/report/primary_metrics/base.py index eb8321862fa4..2de8bd606ba2 100644 --- a/cvat/apps/analytics_report/report/primary_metrics/base.py +++ b/cvat/apps/analytics_report/report/primary_metrics/base.py @@ -51,12 +51,10 @@ def is_filterable_by_date(cls): return cls._is_filterable_by_date @abstractmethod - def calculate(self): - ... + def calculate(self): ... @abstractmethod - def get_empty(self): - ... + def get_empty(self): ... def _make_clickhouse_query(self, parameters): return make_clickhouse_query(query=self._query, parameters=parameters) diff --git a/cvat/apps/quality_control/quality_reports.py b/cvat/apps/quality_control/quality_reports.py index 9e02e299f6a7..0c30dffc783d 100644 --- a/cvat/apps/quality_control/quality_reports.py +++ b/cvat/apps/quality_control/quality_reports.py @@ -484,13 +484,15 @@ def from_dict(cls, d: dict): } return cls( **{field: d[field] for field in optional_fields if field in d}, - **dict( - conflicts_by_type={ - AnnotationConflictType(k): v for k, v in d["conflicts_by_type"].items() - } - ) - if "conflicts_by_type" in d - else {}, + **( + dict( + conflicts_by_type={ + AnnotationConflictType(k): v for k, v in d["conflicts_by_type"].items() + } + ) + if "conflicts_by_type" in d + else {} + ), conflicts=[AnnotationConflict.from_dict(v) for v in d["conflicts"]], annotations=ComparisonReportAnnotationsSummary.from_dict(d["annotations"]), annotation_components=ComparisonReportAnnotationComponentsSummary.from_dict( diff --git a/cvat/requirements/development.in b/cvat/requirements/development.in index 3ac4e7b88799..bea1c0c783ea 100644 --- a/cvat/requirements/development.in +++ b/cvat/requirements/development.in @@ -1,6 +1,6 @@ -r base.in -black==23.3.0 +black>=24.1 django-extensions==3.0.8 django-silk==5.0.3 pylint-django==2.5.3 diff --git a/cvat/requirements/development.txt b/cvat/requirements/development.txt index fb4fe537385a..44f7c896a059 100644 --- a/cvat/requirements/development.txt +++ b/cvat/requirements/development.txt @@ -1,4 +1,4 @@ -# SHA1:c976e8cb5c96afe9ebe284d9b4dcf8019f55140e +# SHA1:27238f2f377debba1b5fe910878f0cc0cfaf6e7d # # This file is autogenerated by pip-compile-multi # To update, run: @@ -10,7 +10,7 @@ astroid==2.11.7 # via pylint autopep8==2.0.4 # via django-silk -black==23.3.0 +black==24.1.1 # via -r cvat/requirements/development.in dill==0.3.7 # via pylint diff --git a/site/requirements.txt b/site/requirements.txt index 8f5c22668639..e240c7a0f90e 100644 --- a/site/requirements.txt +++ b/site/requirements.txt @@ -1,4 +1,3 @@ -black>=22.1.0 gitpython inflection >= 0.5.1 isort>=5.10.1 diff --git a/tests/python/rest_api/test_tasks.py b/tests/python/rest_api/test_tasks.py index 0290741046ab..19af43530aa5 100644 --- a/tests/python/rest_api/test_tasks.py +++ b/tests/python/rest_api/test_tasks.py @@ -1266,9 +1266,9 @@ def _create_task_with_cloud_data( "image_quality": 75, "use_cache": use_cache, "cloud_storage_id": cloud_storage["id"], - "server_files": server_files - if not use_manifest - else server_files + ["test/manifest.jsonl"], + "server_files": ( + server_files if not use_manifest else server_files + ["test/manifest.jsonl"] + ), "sorting_method": sorting_method, } if server_files_exclude: diff --git a/tests/python/rest_api/utils.py b/tests/python/rest_api/utils.py index 64d48cdd932b..4e17932efd87 100644 --- a/tests/python/rest_api/utils.py +++ b/tests/python/rest_api/utils.py @@ -56,8 +56,7 @@ class CollectionSimpleFilterTestBase(metaclass=ABCMeta): cmp_ignore_keys: List[str] = ["updated_date"] @abstractmethod - def _get_endpoint(self, api_client: ApiClient) -> Endpoint: - ... + def _get_endpoint(self, api_client: ApiClient) -> Endpoint: ... def _retrieve_collection(self, **kwargs) -> List: kwargs["return_json"] = True