Mercurial > kallithea
changeset 3886:a1696507b3ad beta
use consisten double quote docstring formatting
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 22 May 2013 02:59:20 +0200 |
parents | 712610e082e2 |
children | 4930abd96a7e |
files | rhodecode/controllers/error.py rhodecode/lib/dbmigrate/migrate/versioning/genmodel.py rhodecode/lib/dbmigrate/migrate/versioning/schemadiff.py rhodecode/lib/vcs/subprocessio.py rhodecode/tests/vcs/test_git.py |
diffstat | 5 files changed, 21 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/controllers/error.py Wed May 22 02:57:52 2013 +0200 +++ b/rhodecode/controllers/error.py Wed May 22 02:59:20 2013 +0200 @@ -87,8 +87,8 @@ return fapp(request.environ, self.start_response) def get_error_explanation(self, code): - ''' get the error explanations of int codes - [400, 401, 403, 404, 500]''' + """ get the error explanations of int codes + [400, 401, 403, 404, 500]""" try: code = int(code) except Exception:
--- a/rhodecode/lib/dbmigrate/migrate/versioning/genmodel.py Wed May 22 02:57:52 2013 +0200 +++ b/rhodecode/lib/dbmigrate/migrate/versioning/genmodel.py Wed May 22 02:59:20 2013 +0200 @@ -144,11 +144,11 @@ return '\n'.join(out) def genB2AMigration(self, indent=' '): - '''Generate a migration from B to A. + """Generate a migration from B to A. Was: toUpgradeDowngradePython Assume model (A) is most current and database (B) is out-of-date. - ''' + """ decls = ['from migrate.changeset import schema', 'pre_meta = MetaData()',
--- a/rhodecode/lib/dbmigrate/migrate/versioning/schemadiff.py Wed May 22 02:57:52 2013 +0200 +++ b/rhodecode/lib/dbmigrate/migrate/versioning/schemadiff.py Wed May 22 02:59:20 2013 +0200 @@ -244,7 +244,7 @@ self.tables_different[table_name]=td def __str__(self): - ''' Summarize differences. ''' + """ Summarize differences. """ out = [] column_template =' %%%is: %%r' % self.label_width
--- a/rhodecode/lib/vcs/subprocessio.py Wed May 22 02:57:52 2013 +0200 +++ b/rhodecode/lib/vcs/subprocessio.py Wed May 22 02:59:20 2013 +0200 @@ -1,4 +1,4 @@ -''' +""" Module provides a class allowing to wrap communication over subprocess.Popen input, output, error streams into a meaningfull, non-blocking, concurrent stream processor exposing the output data as an iterator fitting to be a @@ -21,7 +21,7 @@ You should have received a copy of the GNU Lesser General Public License along with git_http_backend.py Project. If not, see <http://www.gnu.org/licenses/>. -''' +""" import os import subprocess from rhodecode.lib.vcs.utils.compat import deque, Event, Thread, _bytes, _bytearray @@ -143,7 +143,7 @@ class BufferedGenerator(): - ''' + """ Class behaves as a non-blocking, buffered pipe reader. Reads chunks of data (through a thread) from a blocking pipe, and attaches these to an array (Deque) of chunks. @@ -153,7 +153,7 @@ to be sent or by not returning until there is some data to send When we get EOF from underlying source pipe we raise the marker to raise StopIteration after the last chunk of data is yielded. - ''' + """ def __init__(self, source, buffer_size=65536, chunk_size=4096, starting_values=[], bottomless=False): @@ -229,29 +229,29 @@ @property def done_reading_event(self): - ''' + """ Done_reding does not mean that the iterator's buffer is empty. Iterator might have done reading from underlying source, but the read chunks might still be available for serving through .next() method. @return An Event class instance. - ''' + """ return self.worker.EOF @property def done_reading(self): - ''' + """ Done_reding does not mean that the iterator's buffer is empty. Iterator might have done reading from underlying source, but the read chunks might still be available for serving through .next() method. @return An Bool value. - ''' + """ return self.worker.EOF.is_set() @property def length(self): - ''' + """ returns int. This is the lenght of the que of chunks, not the length of @@ -265,7 +265,7 @@ the responce's length will be set to that. In order not to confuse WSGI PEP3333 servers, we will not implement __len__ at all. - ''' + """ return len(self.data) def prepend(self, x): @@ -282,7 +282,7 @@ class SubprocessIOChunker(object): - ''' + """ Processor class wrapping handling of subprocess IO. In a way, this is a "communicate()" replacement with a twist. @@ -324,10 +324,10 @@ # return answer - ''' + """ def __init__(self, cmd, inputstream=None, buffer_size=65536, chunk_size=4096, starting_values=[], **kwargs): - ''' + """ Initializes SubprocessIOChunker :param cmd: A Subprocess.Popen style "cmd". Can be string or array of strings @@ -335,7 +335,7 @@ :param buffer_size: (Default: 65536) A size of total buffer per stream in bytes. :param chunk_size: (Default: 4096) A max size of a chunk. Actual chunk may be smaller. :param starting_values: (Default: []) An array of strings to put in front of output que. - ''' + """ if inputstream: input_streamer = StreamFeeder(inputstream)
--- a/rhodecode/tests/vcs/test_git.py Wed May 22 02:57:52 2013 +0200 +++ b/rhodecode/tests/vcs/test_git.py Wed May 22 02:59:20 2013 +0200 @@ -257,7 +257,7 @@ .get_node('index.rst')) def test_branch_and_tags(self): - ''' + """ rev0 = self.repo.revisions[0] chset0 = self.repo.get_changeset(rev0) self.assertEqual(chset0.branch, 'master') @@ -274,7 +274,7 @@ tip = self.repo.get_changeset('tip') self.assertTrue('tip' in tip.tags) - ''' + """ # Those tests would fail - branches are now going # to be changed at main API in order to support git backend pass