File: styles.py

package info (click to toggle)
python-djangorestframework-yaml 3.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 268 kB
  • sloc: python: 483; makefile: 11
file content (25 lines) | stat: -rw-r--r-- 646 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""String types for YAML."""


class FoldedStr(str):
    """A string which should be rendered as a YAML folded string."""


class LiteralStr(str):
    """A string which should be rendered as a YAML literal string."""


class SingleQuotedStr(str):
    """A string which should be rendered as a YAML single quoted string."""


class DoubleQuotedStr(str):
    """A string which should be rendered as a YAML double quoted string."""


class FlowStyleSequence(list):
    """A sequence which should be rendered as a YAML flow style sequence."""


class FlowStyleMapping(dict):
    """A mapping which should be rendered as a YAML flow style mapping."""