Skip to content

Commit

Permalink
Fixed docstring quotes
Browse files Browse the repository at this point in the history
Docstrings are supposed to use triple quotes according to PEP 257.
  • Loading branch information
agronholm committed Sep 3, 2023
1 parent d2579d4 commit 94c5d28
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cbor2/encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def encode_sortable_key(self, value):

@container_encoder
def encode_canonical_map(self, value):
"Reorder keys according to Canonical CBOR specification"
"""Reorder keys according to Canonical CBOR specification"""
keyed_keys = (
(self.encode_sortable_key(key), key, value) for key, value in value.items()
)
Expand Down
14 changes: 7 additions & 7 deletions cbor2/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,31 @@


class CBORError(Exception):
"Base class for errors that occur during CBOR encoding or decoding."
"""Base class for errors that occur during CBOR encoding or decoding."""


class CBOREncodeError(CBORError):
"Raised for exceptions occurring during CBOR encoding."
"""Raised for exceptions occurring during CBOR encoding."""


class CBOREncodeTypeError(CBOREncodeError, TypeError):
"Raised when attempting to encode a type that cannot be serialized."
"""Raised when attempting to encode a type that cannot be serialized."""


class CBOREncodeValueError(CBOREncodeError, ValueError):
"Raised when the CBOR encoder encounters an invalid value."
"""Raised when the CBOR encoder encounters an invalid value."""


class CBORDecodeError(CBORError):
"Raised for exceptions occurring during CBOR decoding."
"""Raised for exceptions occurring during CBOR decoding."""


class CBORDecodeValueError(CBORDecodeError, ValueError):
"Raised when the CBOR stream being decoded contains an invalid value."
"""Raised when the CBOR stream being decoded contains an invalid value."""


class CBORDecodeEOF(CBORDecodeError, EOFError):
"Raised when decoding unexpectedly reaches EOF."
"""Raised when decoding unexpectedly reaches EOF."""


@total_ordering
Expand Down

0 comments on commit 94c5d28

Please sign in to comment.