Skip to content

Commit

Permalink
Removed the default is from docstrings where not needed log2timeline#76
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Dec 28, 2015
1 parent cb770d0 commit 188d44f
Show file tree
Hide file tree
Showing 51 changed files with 42 additions and 101 deletions.
3 changes: 1 addition & 2 deletions dfvfs/file_io/compressed_stream_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(
Args:
resolver_context: the resolver context (instance of resolver.Context).
compression_method: optional method used to the compress the data.
file_object: optional parent file-like object. The default is None.
file_object: optional parent file-like object.
Raises:
ValueError: if file_object provided but compression_method is not.
Expand Down Expand Up @@ -101,7 +101,6 @@ def _Open(self, path_spec=None, mode='rb'):
Args:
path_spec: optional path specification (instance of path.PathSpec).
The default is None.
mode: optional file access mode. The default is 'rb' read-only binary.
Raises:
Expand Down
3 changes: 1 addition & 2 deletions dfvfs/file_io/data_range_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(self, resolver_context, file_object=None):
Args:
resolver_context: the resolver context (instance of resolver.Context).
file_object: optional parent file-like object. The default is None.
file_object: optional parent file-like object.
"""
super(DataRange, self).__init__(resolver_context)
self._file_object = file_object
Expand Down Expand Up @@ -61,7 +61,6 @@ def _Open(self, path_spec=None, mode='rb'):
Args:
path_spec: optional path specification (instance of path.PathSpec).
The default is None.
mode: optional file access mode. The default is 'rb' read-only binary.
Raises:
Expand Down
3 changes: 1 addition & 2 deletions dfvfs/file_io/encoded_stream_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(
Args:
resolver_context: the resolver context (instance of resolver.Context).
encoding_method: optional method used to the encode the data.
file_object: optional parent file-like object. The default is None.
file_object: optional parent file-like object.
Raises:
ValueError: if file_object provided but encoding_method is not.
Expand Down Expand Up @@ -99,7 +99,6 @@ def _Open(self, path_spec=None, mode='rb'):
Args:
path_spec: optional path specification (instance of path.PathSpec).
The default is None.
mode: optional file access mode. The default is 'rb' read-only binary.
Raises:
Expand Down
2 changes: 1 addition & 1 deletion dfvfs/file_io/ewf_file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self, resolver_context, file_object=None):
Args:
resolver_context: the resolver context (instance of resolver.Context).
file_object: optional file-like object. The default is None.
file_object: optional file-like object.
Raises:
ValueError: when file_object is set.
Expand Down
1 change: 0 additions & 1 deletion dfvfs/file_io/fake_file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def _Open(self, path_spec=None, mode='rb'):
Args:
path_spec: optional path specification (instance of path.PathSpec).
The default is None.
mode: optional file access mode. The default is 'rb' read-only binary.
Raises:
Expand Down
2 changes: 0 additions & 2 deletions dfvfs/file_io/file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def _Open(self, path_spec=None, mode='rb'):
Args:
path_spec: optional path specification (instance of path.PathSpec).
The default is None.
mode: optional file access mode. The default is 'rb' read-only binary.
Raises:
Expand All @@ -56,7 +55,6 @@ def open(self, path_spec=None, mode='rb'):
Args:
path_spec: optional path specification (instance of path.PathSpec).
The default is None.
mode: optional file access mode. The default is 'rb' read-only binary.
Raises:
Expand Down
3 changes: 1 addition & 2 deletions dfvfs/file_io/file_object_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __init__(self, resolver_context, file_object=None):
Args:
resolver_context: the resolver context (instance of resolver.Context).
file_object: optional file-like object. The default is None.
file_object: optional file-like object.
"""
super(FileObjectIO, self).__init__(resolver_context)
self._file_object = file_object
Expand Down Expand Up @@ -45,7 +45,6 @@ def _Open(self, path_spec=None, mode='rb'):
Args:
path_spec: optional the path specification (instance of path.PathSpec).
The default is None.
mode: optional file access mode. The default is 'rb' read-only binary.
Raises:
Expand Down
3 changes: 1 addition & 2 deletions dfvfs/file_io/gzip_file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self, resolver_context, file_object=None):
Args:
resolver_context: the resolver context (instance of resolver.Context).
file_object: optional file-like object. The default is None.
file_object: optional file-like object.
Raises:
ValueError: when file_object is set.
Expand Down Expand Up @@ -137,7 +137,6 @@ def _OpenFileObject(self, path_spec):
Args:
path_spec: optional the path specification (instance of path.PathSpec).
The default is None.
Returns:
A file-like object.
Expand Down
1 change: 0 additions & 1 deletion dfvfs/file_io/ntfs_file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def _Open(self, path_spec=None, mode='rb'):
Args:
path_spec: optional path specification (instance of path.PathSpec).
The default is None.
mode: optional file access mode. The default is 'rb' read-only binary.
Raises:
Expand Down
1 change: 0 additions & 1 deletion dfvfs/file_io/os_file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def _Open(self, path_spec=None, mode='rb'):
Args:
path_spec: optional path specification (instance of path.PathSpec).
The default is None.
mode: optional file access mode. The default is 'rb' read-only binary.
Raises:
Expand Down
2 changes: 1 addition & 1 deletion dfvfs/file_io/raw_file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self, resolver_context, file_object=None):
Args:
resolver_context: the resolver context (instance of resolver.Context).
file_object: optional file-like object. The default is None.
file_object: optional file-like object.
Raises:
ValueError: when file_object is set.
Expand Down
1 change: 0 additions & 1 deletion dfvfs/file_io/sqlite_blob_file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ def _Open(self, path_spec=None, mode='rb'):
Args:
path_spec: optional path specification (instance of path.PathSpec).
The default is None.
mode: optional file access mode. The default is 'rb' read-only binary.
Raises:
Expand Down
1 change: 0 additions & 1 deletion dfvfs/file_io/tar_file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def _Open(self, path_spec=None, mode='rb'):
Args:
path_spec: optional the path specification (instance of path.PathSpec).
The default is None.
mode: optional file access mode. The default is 'rb' read-only binary.
Raises:
Expand Down
1 change: 0 additions & 1 deletion dfvfs/file_io/tsk_file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def _Open(self, path_spec=None, mode='rb'):
Args:
path_spec: optional path specification (instance of path.PathSpec).
The default is None.
mode: optional file access mode. The default is 'rb' read-only binary.
Raises:
Expand Down
1 change: 0 additions & 1 deletion dfvfs/file_io/tsk_partition_file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def _Open(self, path_spec=None, mode='rb'):
Args:
path_spec: optional path specification (instance of path.PathSpec).
The default is None.
mode: optional file access mode. The default is 'rb' read-only binary.
Raises:
Expand Down
1 change: 0 additions & 1 deletion dfvfs/file_io/vshadow_file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def _Open(self, path_spec=None, mode='rb'):
Args:
path_spec: optional path specification (instance of path.PathSpec).
The default is None.
mode: optional file access mode. The default is 'rb' read-only binary.
Raises:
Expand Down
1 change: 0 additions & 1 deletion dfvfs/file_io/zip_file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ def _Open(self, path_spec=None, mode='rb'):
Args:
path_spec: optional the path specification (instance of path.PathSpec).
The default is None.
mode: optional file access mode. The default is 'rb' read-only binary.
Raises:
Expand Down
7 changes: 3 additions & 4 deletions dfvfs/helpers/file_system_searcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ def __init__(
Args:
file_entry_types: Optional file entry types list or None to indicate
no preference. The default is None.
no preference.
is_allocated: Optional boolean value to indicate the file entry should
be allocated, where None represents no preference.
The default is True.
location: Optional location string or list of location segments, or None
to indicate no preference. The location should be defined
relative to the root of the file system. The default is None.
relative to the root of the file system.
Note that the string will be split into segments based on the
file system specific path segment separator.
location_regex: Optional location regular expression string or list of
Expand All @@ -36,7 +35,7 @@ def __init__(
segments based on the file system specific path segment
separator.
case_sensitive: Optional boolean value to indicate string matches should
be case sensitive. The default is true.
be case sensitive.
Raises:
TypeError: if the location or location_regex type is not supported.
Expand Down
6 changes: 3 additions & 3 deletions dfvfs/helpers/windows_path_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(self, file_system, mount_point, drive_letter=u'C'):
mount_point: the mount point path specification (instance of
path.PathSpec).
drive_letter: optional string that contains the drive letter used by
the file system. The default is C.
the file system.
Raises:
PathSpecError: if the mount point path specification is incorrect.
Expand Down Expand Up @@ -111,7 +111,7 @@ def _ResolvePath(self, path, expand_variables=True):
Args:
path: the Windows path to resolve.
expand_variables: optional value to indicate path variables should be
expanded or not. The default is to expand (True).
expanded or not.
Returns:
A tuple of the path in file system specific format and the matching path
Expand Down Expand Up @@ -231,7 +231,7 @@ def ResolvePath(self, path, expand_variables=True):
Args:
path: the Windows path to resolve.
expand_variables: optional value to indicate path variables should be
expanded or not. The default is to expand (True).
expanded or not.
Returns:
The path specification (instance of path.PathSpec) in file system
Expand Down
1 change: 0 additions & 1 deletion dfvfs/path/bde_path_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def __init__(self, parent=None, **kwargs):
Args:
parent: optional parent path specification (instance of PathSpec).
The default is None.
Raises:
ValueError: when parent is not set.
Expand Down
2 changes: 0 additions & 2 deletions dfvfs/path/compressed_stream_path_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ def __init__(self, compression_method=None, parent=None, **kwargs):
Args:
compression_method: optional method used to the compress the data.
The default is None.
parent: optional parent path specification (instance of PathSpec).
The default is None.
kwargs: a dictionary of keyword arguments dependending on the path
specification.
Expand Down
3 changes: 0 additions & 3 deletions dfvfs/path/data_range_path_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ def __init__(self, range_offset=None, range_size=None, parent=None, **kwargs):
Args:
range_offset: optional start offset of the data range.
The default is None.
range_size: optional size of the data range.
The default is None.
parent: optional parent path specification (instance of PathSpec).
The default is None.
kwargs: a dictionary of keyword arguments dependending on the path
specification.
Expand Down
2 changes: 0 additions & 2 deletions dfvfs/path/encoded_stream_path_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ def __init__(self, encoding_method=None, parent=None, **kwargs):
Args:
encoding_method: optional method used to the encode the data.
The default is None.
parent: optional parent path specification (instance of PathSpec).
The default is None.
kwargs: a dictionary of keyword arguments dependending on the path
specification.
Expand Down
1 change: 0 additions & 1 deletion dfvfs/path/ewf_path_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def __init__(self, parent=None, **kwargs):
Args:
parent: optional parent path specification (instance of PathSpec).
The default is None.
kwargs: a dictionary of keyword arguments dependending on the path
specification.
Expand Down
2 changes: 1 addition & 1 deletion dfvfs/path/fake_path_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __init__(self, location=None, **kwargs):
Note that the fake path specification cannot have a parent.
Args:
location: optional location string e.g. /opt/dfvfs. The default is None.
location: optional location string e.g. /opt/dfvfs.
kwargs: a dictionary of keyword arguments dependending on the path
specification.
Expand Down
1 change: 0 additions & 1 deletion dfvfs/path/gzip_path_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def __init__(self, parent=None, **kwargs):
Args:
parent: optional parent path specification (instance of PathSpec).
The default is None.
kwargs: a dictionary of keyword arguments dependending on the path
specification.
Expand Down
2 changes: 1 addition & 1 deletion dfvfs/path/location_path_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self, location=None, parent=None, **kwargs):
"""Initializes the path specification object.
Args:
location: optional location string. The default is None.
location: optional location string.
parent: optional parent path specification (instance of PathSpec),
default is None.
kwargs: a dictionary of keyword arguments dependending on the path
Expand Down
6 changes: 2 additions & 4 deletions dfvfs/path/ntfs_path_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ def __init__(
Args:
data_stream: optional data stream name. The default is None, which
indicates the default data stream.
location: optional location string. The default is None.
location: optional location string.
mft_attribute: optional $FILE_NAME MFT attribute index. The default
is None. The first attribute is indicated by 0.
mft_entry: optional MFT entry. The default is None. The first entry
is indicated by 0.
mft_entry: optional MFT entry. The first entry is indicated by 0.
parent: optional parent path specification (instance of PathSpec),
The default is None.
kwargs: a dictionary of keyword arguments dependending on the path
specification
Expand Down
2 changes: 1 addition & 1 deletion dfvfs/path/os_path_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self, location=None, **kwargs):
Args:
location: optional operating specific location string e.g. /opt/dfvfs or
C:\\Opt\\dfvfs. The default is None.
C:\\Opt\\dfvfs.
kwargs: a dictionary of keyword arguments dependending on the path
specification.
Expand Down
3 changes: 1 addition & 2 deletions dfvfs/path/path_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ def _GetComparable(self, sub_comparable_string=u''):
This is a convenince function for constructing comparables.
Args:
sub_comparable_string: the sub comparable string. The default is
an empty string.
sub_comparable_string: the sub comparable string.
Returns:
A string containing the comparable.
Expand Down
1 change: 0 additions & 1 deletion dfvfs/path/qcow_path_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def __init__(self, parent=None, **kwargs):
Args:
parent: optional parent path specification (instance of PathSpec).
The default is None.
kwargs: a dictionary of keyword arguments dependending on the path
specification.
Expand Down
1 change: 0 additions & 1 deletion dfvfs/path/raw_path_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def __init__(self, parent=None, **kwargs):
Args:
parent: optional parent path specification (instance of PathSpec).
The default is None.
kwargs: a dictionary of keyword arguments dependending on the path
specification.
Expand Down
7 changes: 1 addition & 6 deletions dfvfs/path/sqlite_blob_path_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,13 @@ def __init__(
Args:
table_name: optional name of the table in which the blob is stored.
The default is None.
column_name: optional name of the column in which the blob is stored.
The default is None.
row_condition: optional condition of the row in which the blob is stored.
The condition is a tuple in the form:
(column_name, operator, value).
The condition must yield a single result. The default is
None.
The condition must yield a single result.
row_index: optional index of the row in which the blob is stored.
The default is None.
parent: optional parent path specification (instance of PathSpec).
The default None.
kwargs: a dictionary of keyword arguments dependending on the path
specification
Expand Down
3 changes: 1 addition & 2 deletions dfvfs/path/tar_path_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ def __init__(self, location=None, parent=None, **kwargs):
Args:
location: optional tar file internal location string prefixed with a path
separator character. The default is None.
separator character.
parent: optional parent path specification (instance of PathSpec).
The default is None.
kwargs: a dictionary of keyword arguments dependending on the path
specification.
Expand Down
Loading

0 comments on commit 188d44f

Please sign in to comment.