Merge lp:~vila/bzr/cleanup into lp:bzr

Proposed by Vincent Ladeuil
Status: Merged
Approved by: Vincent Ladeuil
Approved revision: no longer in the source branch.
Merged at revision: 6587
Proposed branch: lp:~vila/bzr/cleanup
Merge into: lp:bzr
Diff against target: 83 lines (+9/-10)
4 files modified
bzrlib/config.py (+3/-4)
bzrlib/filters/__init__.py (+1/-1)
bzrlib/tests/__init__.py (+2/-2)
bzrlib/transport/http/response.py (+3/-3)
To merge this branch: bzr merge lp:~vila/bzr/cleanup
Reviewer Review Type Date Requested Status
Richard Wilbur Approve
Review via email: mp+179476@code.launchpad.net

Commit message

Docstrings cleanup.

Description of the change

A couple of fixes accumulated over time, mostly docstrings, nothing that should be controversial ;)

To post a comment you must log in.
Revision history for this message
Richard Wilbur (richard-wilbur) wrote :

Thanks Vincent for giving some love to the docstrings and good catch on the new builtin function.
+1

review: Approve
Revision history for this message
Vincent Ladeuil (vila) wrote :

sent to pqm by email

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/config.py'
2--- bzrlib/config.py 2012-09-19 09:15:29 +0000
3+++ bzrlib/config.py 2013-08-09 15:16:06 +0000
4@@ -2316,8 +2316,7 @@
5 :param help: a doc string to explain the option to the user.
6
7 :param from_unicode: a callable to convert the unicode string
8- representing the option value in a store. This is not called for
9- the default value.
10+ representing the option value in a store or its default value.
11
12 :param invalid: the action to be taken when an invalid value is
13 encountered in a store. This is called only when from_unicode is
14@@ -3400,9 +3399,9 @@
15
16
17 class LocationStore(LockableIniFileStore):
18- """A config store for global options.
19+ """A config store for options specific to a location.
20
21- There is a single GlobalStore for a given process.
22+ There is a single LocationStore for a given process.
23 """
24
25 def __init__(self, possible_transports=None):
26
27=== modified file 'bzrlib/filters/__init__.py'
28--- bzrlib/filters/__init__.py 2012-08-02 11:28:25 +0000
29+++ bzrlib/filters/__init__.py 2013-08-09 15:16:06 +0000
30@@ -18,7 +18,7 @@
31
32 A filter consists of a read converter, write converter pair.
33 The content in the working tree is called the convenience format
34-while the content actually stored in called the canonical format.
35+while the content actually stored is called the canonical format.
36 The read converter produces canonical content from convenience
37 content while the writer goes the other way.
38
39
40=== modified file 'bzrlib/tests/__init__.py'
41--- bzrlib/tests/__init__.py 2013-06-24 12:03:12 +0000
42+++ bzrlib/tests/__init__.py 2013-08-09 15:16:06 +0000
43@@ -3792,7 +3792,7 @@
44
45 :return: (absents, duplicates) absents is a list containing the test found
46 in id_list but not in test_suite, duplicates is a list containing the
47- test found multiple times in test_suite.
48+ tests found multiple times in test_suite.
49
50 When using a prefined test id list, it may occurs that some tests do not
51 exist anymore or that some tests use the same id. This function warns the
52@@ -4341,7 +4341,7 @@
53 """Copy test and apply scenario to it.
54
55 :param test: A test to adapt.
56- :param scenario: A tuple describing the scenarion.
57+ :param scenario: A tuple describing the scenario.
58 The first element of the tuple is the new test id.
59 The second element is a dict containing attributes to set on the
60 test.
61
62=== modified file 'bzrlib/transport/http/response.py'
63--- bzrlib/transport/http/response.py 2013-05-24 23:45:55 +0000
64+++ bzrlib/transport/http/response.py 2013-08-09 15:16:06 +0000
65@@ -289,15 +289,15 @@
66 % (size, self._start, self._size))
67
68 # read data from file
69- buffer = StringIO()
70+ buf = StringIO()
71 limited = size
72 if self._size > 0:
73 # Don't read past the range definition
74 limited = self._start + self._size - self._pos
75 if size >= 0:
76 limited = min(limited, size)
77- osutils.pumpfile(self._file, buffer, limited, self._max_read_size)
78- data = buffer.getvalue()
79+ osutils.pumpfile(self._file, buf, limited, self._max_read_size)
80+ data = buf.getvalue()
81
82 # Update _pos respecting the data effectively read
83 self._pos += len(data)