Remove "Default" from docstrings.

These are already visible with help(), and are cluttering the page.
This commit is contained in:
Ethan Dalool 2020-09-06 11:13:44 -07:00
parent 7840d53212
commit 5e5f55cf1f

View file

@ -119,8 +119,6 @@ def copy_dir(
or an existing Ratelimiter object. or an existing Ratelimiter object.
The BYTE, KIBIBYTE, etc constants from module 'bytestring' may help. The BYTE, KIBIBYTE, etc constants from module 'bytestring' may help.
Default = None
callback_directory_progress: callback_directory_progress:
This function will be called after each file copy with three parameters: This function will be called after each file copy with three parameters:
name of file copied, number of bytes written to destination directory name of file copied, number of bytes written to destination directory
@ -128,24 +126,17 @@ def copy_dir(
If `precalcsize` is False, this function will receive written bytes If `precalcsize` is False, this function will receive written bytes
for both written and total, showing 100% always. for both written and total, showing 100% always.
Default = None
callback_exclusion: callback_exclusion:
Passed directly into `walk_generator`. Passed directly into `walk_generator`.
Default = None
callback_file_progress: callback_file_progress:
Will be passed into each individual `copy_file` operation as the Will be passed into each individual `copy_file` operation as the
`callback_progress` for that file. `callback_progress` for that file.
Default = None
callback_permission_denied: callback_permission_denied:
Will be passed into each individual `copy_file` operation as the Will be passed into each individual `copy_file` operation as the
`callback_permission_denied` for that file. `callback_permission_denied` for that file.
Default = None
destination_new_root: destination_new_root:
Determine the destination path by calling Determine the destination path by calling
@ -157,30 +148,20 @@ def copy_dir(
dry_run: dry_run:
Do everything except the actual file copying. Do everything except the actual file copying.
Default = False
exclude_filenames: exclude_filenames:
Passed directly into `walk_generator`. Passed directly into `walk_generator`.
Default = None
exclude_directories: exclude_directories:
Passed directly into `walk_generator`. Passed directly into `walk_generator`.
Default = None
files_per_second: files_per_second:
Maximum number of files to be processed per second. Helps to keep CPU Maximum number of files to be processed per second. Helps to keep CPU
usage low. usage low.
Default = None
overwrite_old: overwrite_old:
If True, overwrite the destination file if the source file If True, overwrite the destination file if the source file
has a more recent "last modified" timestamp. has a more recent "last modified" timestamp.
Default = True
precalcsize: precalcsize:
If True, calculate the size of source before beginning the copy. If True, calculate the size of source before beginning the copy.
This number can be used in the callback_directory_progress function. This number can be used in the callback_directory_progress function.
@ -188,14 +169,11 @@ def copy_dir(
bytes (showing 100% always). bytes (showing 100% always).
This may take a while if the source directory is large. This may take a while if the source directory is large.
Default = False
stop_event: stop_event:
If provided, a threading.Event object which when set indicates that we If provided, a threading.Event object which when set indicates that we
should finish the current file and then stop the remainder of the copy. should finish the current file and then stop the remainder of the copy.
Default = None
validate_hash: validate_hash:
Passed directly into each `copy_file`. Passed directly into each `copy_file`.
@ -336,8 +314,6 @@ def copy_file(
or an existing Ratelimiter object. or an existing Ratelimiter object.
The provided BYTE, KIBIBYTE, etc constants may help. The provided BYTE, KIBIBYTE, etc constants may help.
Default = None
callback_permission_denied: callback_permission_denied:
If provided, this function will be called when a source file denies If provided, this function will be called when a source file denies
read access, with the file path and the exception object as parameters. read access, with the file path and the exception object as parameters.
@ -345,7 +321,6 @@ def copy_file(
If not provided, the PermissionError is raised. If not provided, the PermissionError is raised.
Default = None
callback_progress: callback_progress:
If provided, this function will be called after writing If provided, this function will be called after writing
@ -353,30 +328,20 @@ def copy_file(
the Path object being copied, number of bytes written so far, the Path object being copied, number of bytes written so far,
total number of bytes needed. total number of bytes needed.
Default = None
callback_validate_hash: callback_validate_hash:
Passed directly into `verify_hash` Passed directly into `verify_hash`
Default = None
dry_run: dry_run:
Do everything except the actual file copying. Do everything except the actual file copying.
Default = False
overwrite_old: overwrite_old:
If True, overwrite the destination file if the source file If True, overwrite the destination file if the source file
has a more recent "last modified" timestamp. has a more recent "last modified" timestamp.
Default = True
validate_hash: validate_hash:
If True, verify the file hash of the resulting file, using the If True, verify the file hash of the resulting file, using the
`HASH_CLASS` global. `HASH_CLASS` global.
Default = False
Returns: [destination filename, number of bytes written to destination] Returns: [destination filename, number of bytes written to destination]
(Written bytes is 0 if the file already existed.) (Written bytes is 0 if the file already existed.)
''' '''
@ -624,24 +589,18 @@ def walk_generator(
This function will be called when a file or directory is excluded with This function will be called when a file or directory is excluded with
two parameters: the path, and 'file' or 'directory'. two parameters: the path, and 'file' or 'directory'.
Default = None
exclude_filenames: exclude_filenames:
A set of filenames that will not be copied. Entries can be absolute A set of filenames that will not be copied. Entries can be absolute
paths to exclude that particular file, or plain names to exclude paths to exclude that particular file, or plain names to exclude
all matches. For example: all matches. For example:
{'C:\\folder\\file.txt', 'desktop.ini'} {'C:\\folder\\file.txt', 'desktop.ini'}
Default = None
exclude_directories: exclude_directories:
A set of directories that will not be copied. Entries can be A set of directories that will not be copied. Entries can be
absolute paths to exclude that particular directory, or plain names absolute paths to exclude that particular directory, or plain names
to exclude all matches. For example: to exclude all matches. For example:
{'C:\\folder', 'thumbnails'} {'C:\\folder', 'thumbnails'}
Default = None
recurse: recurse:
Yield from subdirectories. If False, only immediate files are returned. Yield from subdirectories. If False, only immediate files are returned.