Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(504)

Unified Diff: dfvfs/path/compressed_stream_path_spec.py

Issue 326910043: [dfvfs] Made Unicode strings the default #204 and updated docstrings #182 (Closed)
Patch Set: Made Unicode strings the default #204 and updated docstrings #182 Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dfvfs/path/bde_path_spec.py ('k') | dfvfs/path/cpio_path_spec.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dfvfs/path/compressed_stream_path_spec.py
diff --git a/dfvfs/path/compressed_stream_path_spec.py b/dfvfs/path/compressed_stream_path_spec.py
index cc3cd44c3a46262665deb99aa8905f1e077884d4..a85c726c7adbdbe0b09d870e04df478c92fcfd2d 100644
--- a/dfvfs/path/compressed_stream_path_spec.py
+++ b/dfvfs/path/compressed_stream_path_spec.py
@@ -1,23 +1,24 @@
# -*- coding: utf-8 -*-
"""The compressed stream path specification implementation."""
+from __future__ import unicode_literals
+
from dfvfs.lib import definitions
from dfvfs.path import factory
from dfvfs.path import path_spec
class CompressedStreamPathSpec(path_spec.PathSpec):
- """Class that implements the compressed stream path specification.
+ """Compressed stream path specification.
Attributes:
- compression_method: string containing the method used to the compress
- the data.
+ compression_method (str): method used to the compress the data.
"""
TYPE_INDICATOR = definitions.TYPE_INDICATOR_COMPRESSED_STREAM
def __init__(self, compression_method=None, parent=None, **kwargs):
- """Initializes the path specification.
+ """Initializes a path specification.
Note that the compressed stream path specification must have a parent.
@@ -29,7 +30,7 @@ class CompressedStreamPathSpec(path_spec.PathSpec):
ValueError: when compression method or parent are not set.
"""
if not compression_method or not parent:
- raise ValueError(u'Missing compression method or parent value.')
+ raise ValueError('Missing compression method or parent value.')
super(CompressedStreamPathSpec, self).__init__(parent=parent, **kwargs)
self.compression_method = compression_method
@@ -38,7 +39,7 @@ class CompressedStreamPathSpec(path_spec.PathSpec):
def comparable(self):
"""str: comparable representation of the path specification."""
sub_comparable_string = (
- u'compression_method: {0:s}').format(self.compression_method)
+ 'compression_method: {0:s}').format(self.compression_method)
return self._GetComparable(sub_comparable_string=sub_comparable_string)
« no previous file with comments | « dfvfs/path/bde_path_spec.py ('k') | dfvfs/path/cpio_path_spec.py » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b