Skip to content

Commit a8508fd

Browse files
committed
Remove positional special parameter for 3.7 compatibility
1 parent 9404fc3 commit a8508fd

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

databricks/sdk/mixins/files.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -760,15 +760,15 @@ def _ensure_open_stream(self):
760760
def detach(self):
761761
raise UnsupportedOperation("Detaching from the buffer is not supported")
762762

763-
def read(self, __size = -1, /):
763+
def read(self, __size = -1):
764764
# Read and return up to size bytes. If omitted, None, or Negative, data is read until EOF is reached
765765
# Empty bytes object returned if stream is EOF
766766
self._ensure_open_stream()
767767
out = self._underlying_stream.read(__size)
768768
self._current_pos_of_underlying_stream += len(out)
769769
return out
770770

771-
def read1(self, __size = ...):
771+
def read1(self, __size = -1):
772772
# Read and return up to size bytes, with at most one read() system call
773773
self._ensure_open_stream()
774774
out = self._underlying_stream.read1(__size)
@@ -829,7 +829,7 @@ def readlines(self, __hint = -1):
829829
self._current_pos_of_underlying_stream += len(out)
830830
return out
831831

832-
def seek(self, __offset, __whence = os.SEEK_SET, /):
832+
def seek(self, __offset, __whence = os.SEEK_SET):
833833
"""
834834
Change the stream position to the given byte offset, which may necessitate closing the existing client connection and opening a new one.
835835

docs/workspace/files/files.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
==================
33
.. currentmodule:: databricks.sdk.service.files
44

5-
.. py:class:: FilesAPI
5+
.. py:class:: FilesExt
66
77
The Files API is a standard HTTP API that allows you to read, write, list, and delete files and
88
directories by referring to their URI. The API makes working with file content as raw bytes easier and
@@ -60,16 +60,16 @@
6060

6161

6262

63-
.. py:method:: download(file_path: str) -> DownloadResponse
63+
.. py:method:: download(file_path: str [, start_byte_offset: Optional[int], if_unmodified_since_timestamp: Optional[datetime]]) -> DownloadResponse
6464
6565
Download a file.
66-
66+
6767
Downloads a file of up to 5 GiB. The file contents are the response body. This is a standard HTTP file
6868
download, not a JSON RPC.
69-
69+
7070
:param file_path: str
7171
The absolute path of the file.
72-
72+
7373
:returns: :class:`DownloadResponse`
7474

7575

0 commit comments

Comments
 (0)