Skip to content

Commit

Permalink
[engine/tests/test_rest_api.py] Fix pylint warnings (#9199)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marishka17 authored Mar 11, 2025
1 parent 3b41386 commit d846281
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cvat/apps/engine/tests/test_rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from io import BytesIO, IOBase
from itertools import product
from time import sleep
from typing import BinaryIO
from unittest import mock

import av
Expand Down Expand Up @@ -1768,13 +1769,13 @@ def get_status(self):
def create_file(cls, key, _bytes):
cls._files[key] = _bytes

def get_file_status(self, key):
def get_file_status(self, key: str, /):
return Status.AVAILABLE if key in self._files else Status.NOT_FOUND

def _download_range_of_bytes(self, key, stop_byte, start_byte):
def _download_range_of_bytes(self, key: str, /, *, stop_byte: int, start_byte: int):
return self._files[key][start_byte:stop_byte]

def _download_fileobj_to_stream(self, key, stream):
def _download_fileobj_to_stream(self, key: str, stream: BinaryIO, /):
stream.write(self._files[key])

cls.mock_aws = MockAWS
Expand Down

0 comments on commit d846281

Please sign in to comment.