id
int64
1
6.07M
name
stringlengths
1
295
code
stringlengths
12
426k
language
stringclasses
1 value
source_file
stringlengths
5
202
start_line
int64
1
158k
end_line
int64
1
158k
repo
dict
6,069,301
__setattr__
def __setattr__(self, name, value): # type: (Any, Any) -> None setattr(self.lazy_self(), name, value)
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/util.py
47
49
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,302
load_yaml_guess_indent
def load_yaml_guess_indent(stream, **kw): # type: (StreamTextType, Any) -> Any """guess the indent and block sequence indent of yaml stream/string returns round_trip_loaded stream, indent level, block sequence indent - block sequence indent is the number of spaces before a dash relative to previous ind...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/util.py
60
120
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,303
leading_spaces
def leading_spaces(l): # type: (Any) -> int idx = 0 while idx < len(l) and l[idx] == ' ': idx += 1 return idx
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/util.py
72
77
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,304
configobj_walker
def configobj_walker(cfg): # type: (Any) -> Any """ walks over a ConfigObj (INI file with comments) generating corresponding YAML output (including comments """ from configobj import ConfigObj # type: ignore assert isinstance(cfg, ConfigObj) for c in cfg.initial_comment: if c.s...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/util.py
123
140
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,305
_walk_section
def _walk_section(s, level=0): # type: (Any, int) -> Any from configobj import Section assert isinstance(s, Section) indent = u' ' * level for name in s.scalars: for c in s.comments[name]: yield indent + c.strip() x = s[name] if u'\n' in x: i = inden...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/util.py
143
172
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,306
CommentCheck
def CommentCheck(): # type: () -> None pass
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/events.py
9
11
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,307
__init__
def __init__(self, start_mark=None, end_mark=None, comment=CommentCheck): # type: (Any, Any, Any) -> None self.start_mark = start_mark self.end_mark = end_mark # assert comment is not CommentCheck if comment is CommentCheck: comment = None self.comment = comme...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/events.py
17
24
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,308
__repr__
def __repr__(self): # type: () -> Any attributes = [ key for key in ['anchor', 'tag', 'implicit', 'value', 'flow_style', 'style'] if hasattr(self, key) ] arguments = ', '.join(['%s=%r' % (key, getattr(self, key)) for key in attributes]) if self...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/events.py
26
36
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,309
__init__
def __init__(self, anchor, start_mark=None, end_mark=None, comment=None): # type: (Any, Any, Any, Any) -> None Event.__init__(self, start_mark, end_mark, comment) self.anchor = anchor
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/events.py
42
45
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,310
__init__
def __init__( self, anchor, tag, implicit, start_mark=None, end_mark=None, flow_style=None, comment=None, nr_items=None, ): # type: (Any, Any, Any, Any, Any, Any, Any, Optional[int]) -> None NodeEvent.__init__(self, anchor, star...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/events.py
51
67
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,311
__init__
def __init__(self, start_mark=None, end_mark=None, encoding=None, comment=None): # type: (Any, Any, Any, Any) -> None Event.__init__(self, start_mark, end_mark, comment) self.encoding = encoding
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/events.py
80
83
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,312
__init__
def __init__( self, start_mark=None, end_mark=None, explicit=None, version=None, tags=None, comment=None, ): # type: (Any, Any, Any, Any, Any, Any) -> None Event.__init__(self, start_mark, end_mark, comment) self.explicit = explicit ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/events.py
93
106
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,313
__init__
def __init__(self, start_mark=None, end_mark=None, explicit=None, comment=None): # type: (Any, Any, Any, Any) -> None Event.__init__(self, start_mark, end_mark, comment) self.explicit = explicit
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/events.py
112
115
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,314
__init__
def __init__( self, anchor, tag, implicit, value, start_mark=None, end_mark=None, style=None, comment=None, ): # type: (Any, Any, Any, Any, Any, Any, Any, Any) -> None NodeEvent.__init__(self, anchor, start_mark, end_mark, comme...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/events.py
125
141
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,315
__new__
def __new__(cls, *args, **kw): # type: (Any, Any, Any) -> Any width = kw.pop("width", None) # type: ignore underscore = kw.pop("underscore", None) # type: ignore anchor = kw.pop("anchor", None) # type: ignore v = no_limit_int.__new__(cls, *args, **kw) # type: ignore v...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarint.py
15
25
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,316
__iadd__
def __iadd__(self, a): # type: ignore # type: (Any) -> Any x = type(self)(self + a) x._width = self._width # type: ignore x._underscore = ( # type: ignore self._underscore[:] if self._underscore is not None else None # type: ignore ) # NOQ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarint.py
27
36
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,317
__ifloordiv__
def __ifloordiv__(self, a): # type: ignore # type: (Any) -> Any x = type(self)(self // a) x._width = self._width # type: ignore x._underscore = ( # type: ignore self._underscore[:] if self._underscore is not None else None # type: ignore ) ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarint.py
38
47
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,318
__imul__
def __imul__(self, a): # type: ignore # type: (Any) -> Any x = type(self)(self * a) x._width = self._width # type: ignore x._underscore = ( # type: ignore self._underscore[:] if self._underscore is not None else None # type: ignore ) # NOQ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarint.py
49
58
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,319
__ipow__
def __ipow__(self, a): # type: ignore # type: (Any) -> Any x = type(self)(self ** a) x._width = self._width # type: ignore x._underscore = ( # type: ignore self._underscore[:] if self._underscore is not None else None # type: ignore ) # NO...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarint.py
60
69
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,320
__isub__
def __isub__(self, a): # type: ignore # type: (Any) -> Any x = type(self)(self - a) x._width = self._width # type: ignore x._underscore = ( # type: ignore self._underscore[:] if self._underscore is not None else None # type: ignore ) # NOQ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarint.py
71
80
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,321
anchor
def anchor(self): # type: () -> Any if not hasattr(self, Anchor.attrib): setattr(self, Anchor.attrib, Anchor()) return getattr(self, Anchor.attrib)
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarint.py
83
87
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,322
yaml_anchor
def yaml_anchor(self, any=False): # type: (bool) -> Any if not hasattr(self, Anchor.attrib): return None if any or self.anchor.always_dump: return self.anchor return None
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarint.py
89
95
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,323
yaml_set_anchor
def yaml_set_anchor(self, value, always_dump=False): # type: (Any, bool) -> None self.anchor.value = value self.anchor.always_dump = always_dump
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarint.py
97
100
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,324
__new__
def __new__(cls, value, width=None, underscore=None, anchor=None): # type: (Any, Any, Any, Any) -> Any return ScalarInt.__new__( cls, value, width=width, underscore=underscore, anchor=anchor )
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarint.py
104
108
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,325
__new__
def __new__(cls, value, width=None, underscore=None, anchor=None): # type: (Any, Any, Any, Any) -> Any return ScalarInt.__new__( cls, value, width=width, underscore=underscore, anchor=anchor )
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarint.py
112
116
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,326
__new__
def __new__(cls, value, width=None, underscore=None, anchor=None): # type: (Any, Any, Any, Any) -> Any return ScalarInt.__new__( cls, value, width=width, underscore=underscore, anchor=anchor )
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarint.py
126
130
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,327
__new__
def __new__(cls, value, width=None, underscore=None, anchor=None): # type: (Any, Any, Any, Any) -> Any return ScalarInt.__new__( cls, value, width=width, underscore=underscore, anchor=anchor )
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarint.py
136
140
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,328
__new__
def __new__(cls, value, width=None, underscore=None, anchor=None): # type: (Any, Any, Any, Any) -> Any return ScalarInt.__new__( cls, value, width=width, underscore=underscore, anchor=anchor )
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarint.py
146
150
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,329
__new__
def __new__(cls, *args, **kw): # type: (Any, Any, Any) -> Any anchor = kw.pop("anchor", None) # type: ignore b = int.__new__(cls, *args, **kw) # type: ignore if anchor is not None: b.yaml_set_anchor(anchor, always_dump=True) return b
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarbool.py
25
31
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,330
anchor
def anchor(self): # type: () -> Any if not hasattr(self, Anchor.attrib): setattr(self, Anchor.attrib, Anchor()) return getattr(self, Anchor.attrib)
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarbool.py
34
38
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,331
yaml_anchor
def yaml_anchor(self, any=False): # type: (bool) -> Any if not hasattr(self, Anchor.attrib): return None if any or self.anchor.always_dump: return self.anchor return None
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarbool.py
40
46
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,332
yaml_set_anchor
def yaml_set_anchor(self, value, always_dump=False): # type: (Any, bool) -> None self.anchor.value = value self.anchor.always_dump = always_dump
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarbool.py
48
51
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,333
configobj_walker
def configobj_walker(cfg): # type: (Any) -> Any warnings.warn( "configobj_walker has moved to srsly.ruamel_yaml.util, please update your code" ) return new_configobj_walker(cfg)
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/configobjwalker.py
11
16
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,334
get_classobj_bases
def get_classobj_bases(cls): # type: (Any) -> Any bases = [cls] for base in cls.__bases__: bases.extend(get_classobj_bases(base)) return bases
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
48
53
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,335
__init__
def __init__(self, default_style=None, default_flow_style=None, dumper=None): # type: (Any, Any, Any, Any) -> None self.dumper = dumper if self.dumper is not None: self.dumper._representer = self self.default_style = default_style self.default_flow_style = default_flo...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
61
71
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,336
serializer
def serializer(self): # type: () -> Any try: if hasattr(self.dumper, "typ"): return self.dumper.serializer return self.dumper._serializer except AttributeError: return self # cyaml
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
74
81
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,337
represent
def represent(self, data): # type: (Any) -> None node = self.represent_data(data) self.serializer.serialize(node) self.represented_objects = {} self.object_keeper = [] self.alias_key = None
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
83
89
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,338
represent_data
def represent_data(self, data): # type: (Any) -> Any if self.ignore_aliases(data): self.alias_key = None else: self.alias_key = id(data) if self.alias_key is not None: if self.alias_key in self.represented_objects: node = self.represent...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
91
127
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,339
represent_key
def represent_key(self, data): # type: (Any) -> Any """ David Fraser: Extract a method to represent keys in mappings, so that a subclass can choose not to quote them (for example) used in represent_mapping https://bitbucket.org/davidfraser/pyyaml/commits/d81df6eb95f20cac4...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
129
137
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,340
add_representer
def add_representer(cls, data_type, representer): # type: (Any, Any) -> None if "yaml_representers" not in cls.__dict__: cls.yaml_representers = cls.yaml_representers.copy() cls.yaml_representers[data_type] = representer
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
140
144
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,341
add_multi_representer
def add_multi_representer(cls, data_type, representer): # type: (Any, Any) -> None if "yaml_multi_representers" not in cls.__dict__: cls.yaml_multi_representers = cls.yaml_multi_representers.copy() cls.yaml_multi_representers[data_type] = representer
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
147
151
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,342
represent_scalar
def represent_scalar(self, tag, value, style=None, anchor=None): # type: (Any, Any, Any, Any) -> Any if style is None: style = self.default_style comment = None if style and style[0] in "|>": comment = getattr(value, "comment", None) if comment: ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
153
165
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,343
represent_sequence
def represent_sequence(self, tag, sequence, flow_style=None): # type: (Any, Any, Any) -> Any value = [] # type: List[Any] node = SequenceNode(tag, value, flow_style=flow_style) if self.alias_key is not None: self.represented_objects[self.alias_key] = node best_style ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
167
184
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,344
represent_omap
def represent_omap(self, tag, omap, flow_style=None): # type: (Any, Any, Any) -> Any value = [] # type: List[Any] node = SequenceNode(tag, value, flow_style=flow_style) if self.alias_key is not None: self.represented_objects[self.alias_key] = node best_style = True ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
186
205
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,345
represent_mapping
def represent_mapping(self, tag, mapping, flow_style=None): # type: (Any, Any, Any) -> Any value = [] # type: List[Any] node = MappingNode(tag, value, flow_style=flow_style) if self.alias_key is not None: self.represented_objects[self.alias_key] = node best_style = T...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
207
234
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,346
ignore_aliases
def ignore_aliases(self, data): # type: (Any) -> bool return False
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
236
238
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,347
ignore_aliases
def ignore_aliases(self, data): # type: (Any) -> bool # https://docs.python.org/3/reference/expressions.html#parenthesized-forms : # "i.e. two occurrences of the empty tuple may or may not yield the same object" # so "data is ()" should not be used if data is None or (isinstance(...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
242
251
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,348
represent_none
def represent_none(self, data): # type: (Any) -> Any return self.represent_scalar(u"tag:yaml.org,2002:null", u"null")
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
253
255
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,349
represent_str
def represent_str(self, data): # type: (Any) -> Any return self.represent_scalar(u"tag:yaml.org,2002:str", data)
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
259
261
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,350
represent_binary
def represent_binary(self, data): # type: (Any) -> Any if hasattr(base64, "encodebytes"): data = base64.encodebytes(data).decode("ascii") else: data = base64.encodestring(data).decode("ascii") return self.represent_scalar(u"tag:yaml.org,200...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
263
269
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,351
represent_str
def represent_str(self, data): # type: (Any) -> Any tag = None style = None try: data = unicode(data, "ascii") tag = u"tag:yaml.org,2002:str" except UnicodeDecodeError: try: data = unicode(dat...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
273
288
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,352
represent_unicode
def represent_unicode(self, data): # type: (Any) -> Any return self.represent_scalar(u"tag:yaml.org,2002:str", data)
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
290
292
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,353
represent_bool
def represent_bool(self, data, anchor=None): # type: (Any, Optional[Any]) -> Any try: value = self.dumper.boolean_representation[bool(data)] except AttributeError: if data: value = u"true" else: value = u"false" return s...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
294
303
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,354
represent_int
def represent_int(self, data): # type: (Any) -> Any return self.represent_scalar(u"tag:yaml.org,2002:int", text_type(data))
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
305
307
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,355
represent_long
def represent_long(self, data): # type: (Any) -> Any return self.represent_scalar(u"tag:yaml.org,2002:int", text_type(data))
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
311
313
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,356
represent_float
def represent_float(self, data): # type: (Any) -> Any if data != data or (data == 0.0 and data == 1.0): value = u".nan" elif data == self.inf_value: value = u".inf" elif data == -self.inf_value: value = u"-.inf" else: value = to_uni...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
319
339
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,357
represent_list
def represent_list(self, data): # type: (Any) -> Any # pairs = (len(data) > 0 and isinstance(data, list)) # if pairs: # for item in data: # if not isinstance(item, tuple) or len(item) != 2: # pairs = False # break # if n...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
341
350
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,358
represent_dict
def represent_dict(self, data): # type: (Any) -> Any return self.represent_mapping(u"tag:yaml.org,2002:map", data)
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
358
360
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,359
represent_ordereddict
def represent_ordereddict(self, data): # type: (Any) -> Any return self.represent_omap(u"tag:yaml.org,2002:omap", data)
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
362
364
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,360
represent_set
def represent_set(self, data): # type: (Any) -> Any value = {} # type: Dict[Any, None] for key in data: value[key] = None return self.represent_mapping(u"tag:yaml.org,2002:set", value)
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
366
371
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,361
represent_date
def represent_date(self, data): # type: (Any) -> Any value = to_unicode(data.isoformat()) return self.represent_scalar(u"tag:yaml.org,2002:timestamp", value)
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
373
376
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,362
represent_datetime
def represent_datetime(self, data): # type: (Any) -> Any value = to_unicode(data.isoformat(" ")) return self.represent_scalar(u"tag:yaml.org,2002:timestamp", value)
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
378
381
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,363
represent_yaml_object
def represent_yaml_object(self, tag, data, cls, flow_style=None): # type: (Any, Any, Any, Any) -> Any if hasattr(data, "__getstate__"): state = data.__getstate__() else: state = data.__dict__.copy() return self.represent_mapping(tag, state, flow_style=flow_style)
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
383
389
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,364
represent_undefined
def represent_undefined(self, data): # type: (Any) -> None raise RepresenterError("cannot represent an object: %s" % (data,))
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
391
393
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,365
represent_str
def represent_str(self, data): # type: (Any) -> Any tag = None style = None try: data = unicode(data, "ascii") tag = u"tag:yaml.org,2002:str" except UnicodeDecodeError: try: data = unicode(dat...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
441
456
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,366
represent_unicode
def represent_unicode(self, data): # type: (Any) -> Any tag = None try: data.encode("ascii") tag = u"tag:yaml.org,2002:python/unicode" except UnicodeEncodeError: tag = u"tag:yaml.org,2002:str" return self.represe...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
458
466
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,367
represent_long
def represent_long(self, data): # type: (Any) -> Any tag = u"tag:yaml.org,2002:int" if int(data) is not data: tag = u"tag:yaml.org,2002:python/long" return self.represent_scalar(tag, to_unicode(data))
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
468
473
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,368
represent_complex
def represent_complex(self, data): # type: (Any) -> Any if data.imag == 0.0: data = u"%r" % data.real elif data.real == 0.0: data = u"%rj" % data.imag elif data.imag > 0: data = u"%r+%rj" % (data.real, data.imag) else: data = u"%r%r...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
475
485
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,369
represent_tuple
def represent_tuple(self, data): # type: (Any) -> Any return self.represent_sequence(u"tag:yaml.org,2002:python/tuple", data)
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
487
489
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,370
represent_name
def represent_name(self, data): # type: (Any) -> Any try: name = u"%s.%s" % (data.__module__, data.__qualname__) except AttributeError: # probably PY2 name = u"%s.%s" % (data.__module__, data.__name__) return self.represent_scalar(u"tag:yaml.org,2002:p...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
491
498
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,371
represent_module
def represent_module(self, data): # type: (Any) -> Any return self.represent_scalar( u"tag:yaml.org,2002:python/module:" + data.__name__, "" )
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
500
504
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,372
represent_instance
def represent_instance(self, data): # type: (Any) -> Any # For instances of classic classes, we use __getinitargs__ and # __getstate__ to serialize the data. # If data.__getinitargs__ exists, the object must be reconstructed # by calling cls(**args), where ar...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
508
551
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,373
represent_object
def represent_object(self, data): # type: (Any) -> Any # We use __reduce__ API to save the data. data.__reduce__ returns # a tuple of length 2-5: # (function, args, state, listitems, dictitems) # For reconstructing, we calls function(*args), then set its state, # listi...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
553
623
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,374
__init__
def __init__(self, default_style=None, default_flow_style=None, dumper=None): # type: (Any, Any, Any) -> None if not hasattr(dumper, "typ") and default_flow_style is None: default_flow_style = False SafeRepresenter.__init__( self, default_style=default_style, ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
674
683
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,375
ignore_aliases
def ignore_aliases(self, data): # type: (Any) -> bool try: if data.anchor is not None and data.anchor.value is not None: return False except AttributeError: pass return SafeRepresenter.ignore_aliases(self, data)
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
685
692
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,376
represent_none
def represent_none(self, data): # type: (Any) -> Any if ( len(self.represented_objects) == 0 and not self.serializer.use_explicit_start ): # this will be open ended (although it is not yet) return self.represent_scalar(u"tag:yaml.org,2002:null", u"...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
694
702
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,377
represent_literal_scalarstring
def represent_literal_scalarstring(self, data): # type: (Any) -> Any tag = None style = "|" anchor = data.yaml_anchor(any=True) if PY2 and not isinstance(data, unicode): data = unicode(data, "ascii") tag = u"tag:yaml.org,2002:str" return self.represent...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
704
712
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,378
represent_folded_scalarstring
def represent_folded_scalarstring(self, data): # type: (Any) -> Any tag = None style = ">" anchor = data.yaml_anchor(any=True) for fold_pos in reversed(getattr(data, "fold_pos", [])): if ( data[fold_pos] == " " and (fold_pos > 0 and not...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
716
731
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,379
represent_single_quoted_scalarstring
def represent_single_quoted_scalarstring(self, data): # type: (Any) -> Any tag = None style = "'" anchor = data.yaml_anchor(any=True) if PY2 and not isinstance(data, unicode): data = unicode(data, "ascii") tag = u"tag:yaml.org,2002:str" return self.rep...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
733
741
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,380
represent_double_quoted_scalarstring
def represent_double_quoted_scalarstring(self, data): # type: (Any) -> Any tag = None style = '"' anchor = data.yaml_anchor(any=True) if PY2 and not isinstance(data, unicode): data = unicode(data, "ascii") tag = u"tag:yaml.org,2002:str" return self.rep...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
743
751
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,381
represent_plain_scalarstring
def represent_plain_scalarstring(self, data): # type: (Any) -> Any tag = None style = "" anchor = data.yaml_anchor(any=True) if PY2 and not isinstance(data, unicode): data = unicode(data, "ascii") tag = u"tag:yaml.org,2002:str" return self.represent_sc...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
753
761
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,382
insert_underscore
def insert_underscore(self, prefix, s, underscore, anchor=None): # type: (Any, Any, Any, Any) -> Any if underscore is None: return self.represent_scalar( u"tag:yaml.org,2002:int", prefix + s, anchor=anchor ) if underscore[0]: sl = list(s) ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
763
782
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,383
represent_scalar_int
def represent_scalar_int(self, data): # type: (Any) -> Any if data._width is not None: s = "{:0{}d}".format(data, data._width) else: s = format(data, "d") anchor = data.yaml_anchor(any=True) return self.insert_underscore("", s, data._underscore, anchor=anc...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
784
791
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,384
represent_binary_int
def represent_binary_int(self, data): # type: (Any) -> Any if data._width is not None: # cannot use '{:#0{}b}', that strips the zeros s = "{:0{}b}".format(data, data._width) else: s = format(data, "b") anchor = data.yaml_anchor(any=True) return...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
793
801
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,385
represent_octal_int
def represent_octal_int(self, data): # type: (Any) -> Any if data._width is not None: # cannot use '{:#0{}o}', that strips the zeros s = "{:0{}o}".format(data, data._width) else: s = format(data, "o") anchor = data.yaml_anchor(any=True) return ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
803
811
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,386
represent_hex_int
def represent_hex_int(self, data): # type: (Any) -> Any if data._width is not None: # cannot use '{:#0{}x}', that strips the zeros s = "{:0{}x}".format(data, data._width) else: s = format(data, "x") anchor = data.yaml_anchor(any=True) return se...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
813
821
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,387
represent_hex_caps_int
def represent_hex_caps_int(self, data): # type: (Any) -> Any if data._width is not None: # cannot use '{:#0{}X}', that strips the zeros s = "{:0{}X}".format(data, data._width) else: s = format(data, "X") anchor = data.yaml_anchor(any=True) retu...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
823
831
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,388
represent_scalar_float
def represent_scalar_float(self, data): # type: (Any) -> Any """ this is way more complicated """ value = None anchor = data.yaml_anchor(any=True) if data != data or (data == 0.0 and data == 1.0): value = u".nan" elif data == self.inf_value: value ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
833
924
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,389
represent_sequence
def represent_sequence(self, tag, sequence, flow_style=None): # type: (Any, Any, Any) -> Any value = [] # type: List[Any] # if the flow_style is None, the flow style tacked on to the object # explicitly will be taken. If that is None as well the default flow # style rules ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
926
975
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,390
merge_comments
def merge_comments(self, node, comments): # type: (Any, Any) -> Any if comments is None: assert hasattr(node, "comment") return node if getattr(node, "comment", None) is not None: for idx, val in enumerate(comments): if idx >= len(node.comment)...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
977
991
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,391
represent_key
def represent_key(self, data): # type: (Any) -> Any if isinstance(data, CommentedKeySeq): self.alias_key = None return self.represent_sequence( u"tag:yaml.org,2002:seq", data, flow_style=True ) if isinstance(data, CommentedKeyMap): ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
993
1,005
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,392
represent_mapping
def represent_mapping(self, tag, mapping, flow_style=None): # type: (Any, Any, Any) -> Any value = [] # type: List[Any] try: flow_style = mapping.fa.flow_style(flow_style) except AttributeError: flow_style = flow_style try: anchor = mapping.ya...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
1,007
1,085
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,393
represent_omap
def represent_omap(self, tag, omap, flow_style=None): # type: (Any, Any, Any) -> Any value = [] # type: List[Any] try: flow_style = omap.fa.flow_style(flow_style) except AttributeError: flow_style = flow_style try: anchor = omap.yaml_anchor() ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
1,087
1,145
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,394
represent_set
def represent_set(self, setting): # type: (Any) -> Any flow_style = False tag = u"tag:yaml.org,2002:set" # return self.represent_mapping(tag, value) value = [] # type: List[Any] flow_style = setting.fa.flow_style(flow_style) try: anchor = setting.yaml...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
1,147
1,194
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,395
represent_dict
def represent_dict(self, data): # type: (Any) -> Any """write out tag if saved on loading""" try: t = data.tag.value except AttributeError: t = None if t: if t.startswith("!!"): tag = "tag:yaml.org,2002:" + t[2:] els...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
1,196
1,210
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,396
represent_list
def represent_list(self, data): # type: (Any) -> Any try: t = data.tag.value except AttributeError: t = None if t: if t.startswith("!!"): tag = "tag:yaml.org,2002:" + t[2:] else: tag = t else: ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
1,212
1,225
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,397
represent_datetime
def represent_datetime(self, data): # type: (Any) -> Any inter = "T" if data._yaml["t"] else " " _yaml = data._yaml if _yaml["delta"]: data += _yaml["delta"] value = data.isoformat(inter) else: value = data.isoformat(inter) if _yaml["tz...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
1,227
1,238
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,398
represent_tagged_scalar
def represent_tagged_scalar(self, data): # type: (Any) -> Any try: tag = data.tag.value except AttributeError: tag = None try: anchor = data.yaml_anchor() except AttributeError: anchor = None return self.represent_scalar(tag...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
1,240
1,250
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,399
represent_scalar_bool
def represent_scalar_bool(self, data): # type: (Any) -> Any try: anchor = data.yaml_anchor() except AttributeError: anchor = None return SafeRepresenter.represent_bool(self, data, anchor=anchor)
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/representer.py
1,252
1,258
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,400
__init__
def __init__(self, start_mark, end_mark): # type: (StreamMark, StreamMark) -> None self.start_mark = start_mark self.end_mark = end_mark
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/tokens.py
16
19
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }