Skip to content
This repository was archived by the owner on Apr 19, 2024. It is now read-only.

Commit 49bce75

Browse files
committed
use stop instead of colons before doctest blocks in docstrings
In case the blocks must be moved out to module docstrings or unit tests.
1 parent a59b2ba commit 49bce75

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

multihash.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -276,16 +276,16 @@ def get_decoder(cls, encoding):
276276
class Multihash(namedtuple('Multihash', 'func digest')):
277277
"""A named tuple representing a multihash function and digest.
278278
279-
The hash function is a `Func` member:
279+
The hash function is usually a `Func` member.
280280
281281
>>> mh = Multihash(Func.sha1, b'BINARY_DIGEST')
282282
>>> mh == (Func.sha1, b'BINARY_DIGEST')
283283
True
284284
>>> mh == (mh.func, mh.digest)
285285
True
286286
287-
Although it can also be its integer value (the function code) or its
288-
string name (the function name, with either underscore or hyphen):
287+
However it can also be its integer value (the function code) or its string
288+
name (the function name, with either underscore or hyphen).
289289
290290
>>> mhfc = Multihash(Func.sha1.value, mh.digest)
291291
>>> mhfc == mh
@@ -295,7 +295,7 @@ class Multihash(namedtuple('Multihash', 'func digest')):
295295
True
296296
297297
Application-specific codes (0x00-0x0f) are also accepted. Other codes
298-
raise a `ValueError`:
298+
raise a `ValueError`.
299299
300300
>>> mhfc = Multihash(0x01, b'...')
301301
>>> mhfc.func
@@ -355,7 +355,7 @@ def encode(self, encoding=None):
355355
b'\x01\x04TEST'
356356
357357
If the name of an `encoding` is specified, it is used to encode the
358-
binary digest before returning it (see `Codecs` for supported codecs):
358+
binary digest before returning it (see `Codecs` for supported codecs).
359359
360360
>>> mh.encode('base64')
361361
b'AQRURVNU'
@@ -417,15 +417,15 @@ def truncate(self, length):
417417
def decode(mhash, encoding=None):
418418
r"""Decode a multihash-encoded digest into a `Multihash`.
419419
420-
If `encoding` is `None`, a binary digest is assumed:
420+
If `encoding` is `None`, a binary digest is assumed.
421421
422422
>>> mhash = b'\x11\x0a\x0b\xee\xc7\xb5\xea?\x0f\xdb\xc9]'
423423
>>> mh = decode(mhash)
424424
>>> mh == (Func.sha1, mhash[2:])
425425
True
426426
427427
If the name of an `encoding` is specified, it is used to decode the digest
428-
before parsing it (see `Codecs` for supported codecs):
428+
before parsing it (see `Codecs` for supported codecs).
429429
430430
>>> import base64
431431
>>> emhash = base64.b64encode(mhash)

0 commit comments

Comments
 (0)