index int64 0 731k | package stringlengths 2 98 ⌀ | name stringlengths 1 76 | docstring stringlengths 0 281k ⌀ | code stringlengths 4 8.19k | signature stringlengths 2 42.8k ⌀ | embed_func_code listlengths 768 768 |
|---|---|---|---|---|---|---|
5,186 | releases.models | __repr__ | null | def __repr__(self):
flag = ""
if self.backported:
flag = "backported"
elif self.major:
flag = "major"
elif self.spec:
flag = self.spec
if flag:
flag = " ({})".format(flag)
return "<{issue.type} #{issue.number}{flag}>".format(
issue=self, flag=flag
)
| (self) | [
0.04494401440024376,
-0.03304913640022278,
0.037916023284196854,
0.014890559948980808,
0.047403812408447266,
-0.10120309889316559,
0.014644579961895943,
-0.011596187949180603,
0.05211256816983223,
-0.0630059540271759,
-0.007032385561615229,
0.008196396753191948,
-0.04357355460524559,
0.028... |
5,187 | docutils.nodes | __setitem__ | null | def __setitem__(self, key, item):
if isinstance(key, str):
self.attributes[str(key)] = item
elif isinstance(key, int):
self.setup_child(item)
self.children[key] = item
elif isinstance(key, slice):
assert key.step in (None, 1), 'cannot handle slice with stride'
for nod... | (self, key, item) | [
0.01975373364984989,
0.015954261645674706,
-0.03456463664770126,
0.006657870020717382,
-0.028566397726535797,
0.018065080046653748,
-0.02532980963587761,
0.03662268444895744,
0.011609496548771858,
0.0017348281107842922,
-0.010650833137333393,
0.021671060472726822,
0.08063323050737381,
0.04... |
5,188 | docutils.nodes | __str__ | null | def __str__(self):
if self.children:
return '%s%s%s' % (self.starttag(),
''.join(str(c) for c in self.children),
self.endtag())
else:
return self.emptytag()
| (self) | [
0.025774961337447166,
-0.033790670335292816,
0.05881750211119652,
-0.042322948575019836,
0.018195662647485733,
-0.016957679763436317,
0.006884604226797819,
-0.04185982048511505,
0.08806593716144562,
-0.05297493934631348,
-0.009681196883320808,
0.0020707251969724894,
0.02219461090862751,
0.... |
5,189 | docutils.nodes | _dom_node | null | def _dom_node(self, domroot):
element = domroot.createElement(self.tagname)
for attribute, value in self.attlist():
if isinstance(value, list):
value = ' '.join(serial_escape('%s' % (v,)) for v in value)
element.setAttribute(attribute, '%s' % value)
for child in self.children:
... | (self, domroot) | [
-0.0008689163951203227,
0.024350224062800407,
0.03023669123649597,
-0.009725465439260006,
0.016041534021496773,
0.047128286212682724,
-0.03195510059595108,
0.02791501022875309,
0.008071038872003555,
0.046726107597351074,
0.02873765304684639,
0.04913919046521187,
0.028755933046340942,
0.013... |
5,190 | docutils.nodes | _fast_findall | Return iterator that only supports instance checks. | def _fast_findall(self, cls):
"""Return iterator that only supports instance checks."""
if isinstance(self, cls):
yield self
for child in self.children:
yield from child._fast_findall(cls)
| (self, cls) | [
0.03044508397579193,
-0.07560470700263977,
-0.025575272738933563,
0.010554179549217224,
-0.07686595618724823,
0.031110743060708046,
0.0353148952126503,
-0.020495252683758736,
0.07539450377225876,
-0.00703320000320673,
0.0263635516166687,
0.013295638374984264,
0.05360296741127968,
0.0034947... |
5,191 | docutils.nodes | _superfast_findall | Return iterator that doesn't check for a condition. | def _superfast_findall(self):
"""Return iterator that doesn't check for a condition."""
# This is different from ``iter(self)`` implemented via
# __getitem__() and __len__() in the Element subclass,
# which yields only the direct children.
yield self
for child in self.children:
yield fro... | (self) | [
0.018188098445534706,
-0.0724739134311676,
-0.024836761876940727,
-0.006618204992264509,
-0.025985483080148697,
0.009128858335316181,
0.021251356229186058,
-0.03317369893193245,
0.04392991214990616,
-0.010155746713280678,
0.013836878351867199,
0.025271883234381676,
0.03427020460367203,
0.0... |
5,192 | releases.models | add_to_manager |
Given a 'manager' structure, add self to one or more of its 'buckets'.
| def add_to_manager(self, manager):
"""
Given a 'manager' structure, add self to one or more of its 'buckets'.
"""
# Derive version spec allowing us to filter against major/minor buckets
spec = self.spec or self.default_spec(manager)
# Only look in appropriate major version/family; if self is an ... | (self, manager) | [
0.059984903782606125,
0.010494613088667393,
-0.1239224448800087,
0.04966413229703903,
-0.004108178894966841,
-0.05932613089680672,
-0.011729812249541283,
-0.0020655265543609858,
-0.024173295125365257,
-0.007539286278188229,
0.01170236337929964,
-0.02794293686747551,
0.008147736079990864,
-... |
5,193 | docutils.nodes | append | null | def append(self, item):
self.setup_child(item)
self.children.append(item)
| (self, item) | [
-0.0159485824406147,
0.03537777066230774,
-0.03773180767893791,
0.015402110293507576,
0.016722051426768303,
0.029341354966163635,
-0.005641275085508823,
0.053873755037784576,
0.016511868685483932,
0.028702404350042343,
0.02865196019411087,
0.00043954234570264816,
0.03675656393170357,
0.048... |
5,194 | docutils.nodes | append_attr_list |
For each element in values, if it does not exist in self[attr], append
it.
NOTE: Requires self[attr] and values to be sequence type and the
former should specifically be a list.
| def append_attr_list(self, attr, values):
"""
For each element in values, if it does not exist in self[attr], append
it.
NOTE: Requires self[attr] and values to be sequence type and the
former should specifically be a list.
"""
# List Concatenation
for value in values:
if value n... | (self, attr, values) | [
0.008288612589240074,
0.025267107412219048,
-0.010131005197763443,
-0.006290888413786888,
0.0016557808266952634,
0.014264524914324284,
-0.014488891698420048,
-0.03494938090443611,
0.058093637228012085,
0.012676700949668884,
-0.042560577392578125,
-0.003620065515860915,
0.08532826602458954,
... |
5,195 | docutils.nodes | asdom | Return a DOM **fragment** representation of this Node. | def asdom(self, dom=None):
"""Return a DOM **fragment** representation of this Node."""
if dom is None:
import xml.dom.minidom as dom
domroot = dom.Document()
return self._dom_node(domroot)
| (self, dom=None) | [
-0.003034241497516632,
0.03528793528676033,
0.055375467985868454,
-0.04006725922226906,
0.010340227745473385,
0.03185616806149483,
-0.03280843794345856,
0.03509029373526573,
-0.02186630293726921,
0.03859393298625946,
0.02964617870748043,
-0.012244770303368568,
-0.0018697305349633098,
0.024... |
5,196 | docutils.nodes | astext | null | def astext(self):
return self.child_text_separator.join(
[child.astext() for child in self.children])
| (self) | [
0.029677337035536766,
-0.034382279962301254,
0.12050170451402664,
0.02156001701951027,
0.03912169113755226,
-0.03024606592953205,
0.011426291428506374,
-0.013261736370623112,
0.08837711066007614,
0.000696909031830728,
0.024093447253108025,
-0.04025915265083313,
0.013520250096917152,
0.0124... |
5,197 | docutils.nodes | attlist | null | def attlist(self):
return sorted(self.non_default_attributes().items())
| (self) | [
0.028908811509609222,
0.03151245042681694,
-0.0033007445745170116,
-0.04172544181346893,
0.023399170488119125,
-0.014462804421782494,
0.024642199277877808,
-0.06248737871646881,
0.08304774016141891,
0.010448157787322998,
-0.06322647631168365,
-0.01016259752213955,
0.014672774821519852,
0.0... |
5,198 | docutils.nodes | clear | null | def clear(self):
self.children = []
| (self) | [
0.0010022810893133283,
0.044688258320093155,
-0.013999038375914097,
-0.0294073186814785,
-0.06587782502174377,
0.03884754329919815,
-0.04706529527902603,
0.036436550319194794,
0.05884859710931778,
0.026520919054746628,
-0.0219705943018198,
-0.007882418110966682,
0.045774903148412704,
0.007... |
5,199 | docutils.nodes | coerce_append_attr_list |
First, convert both self[attr] and value to a non-string sequence
type; if either is not already a sequence, convert it to a list of one
element. Then call append_attr_list.
NOTE: self[attr] and value both must not be None.
| def coerce_append_attr_list(self, attr, value):
"""
First, convert both self[attr] and value to a non-string sequence
type; if either is not already a sequence, convert it to a list of one
element. Then call append_attr_list.
NOTE: self[attr] and value both must not be None.
"""
# List Conc... | (self, attr, value) | [
-0.0023757691960781813,
0.029264558106660843,
0.018742667511105537,
0.004918413236737251,
0.0005011731409467757,
0.022694963961839676,
0.013499287888407707,
0.0004446333332452923,
0.04704111069440842,
-0.017750201746821404,
-0.009775346145033836,
-0.005928444676101208,
0.07377620041370392,
... |
5,200 | docutils.nodes | copy | null | def copy(self):
obj = self.__class__(rawsource=self.rawsource, **self.attributes)
obj._document = self._document
obj.source = self.source
obj.line = self.line
return obj
| (self) | [
0.0023201273288577795,
-0.011802859604358673,
0.0269804485142231,
-0.020300570875406265,
-0.08537720143795013,
-0.026058487594127655,
-0.0035726046189665794,
0.05723125487565994,
0.053195495158433914,
0.028737396001815796,
-0.027571896091103554,
-0.01296835858374834,
-0.023901442065835,
0.... |
5,201 | docutils.nodes | copy_attr_coerce |
If attr is an attribute of self and either self[attr] or value is a
list, convert all non-sequence values to a sequence of 1 element and
then concatenate the two sequence, setting the result to self[attr].
If both self[attr] and value are non-sequences and replace is True or
sel... | def copy_attr_coerce(self, attr, value, replace):
"""
If attr is an attribute of self and either self[attr] or value is a
list, convert all non-sequence values to a sequence of 1 element and
then concatenate the two sequence, setting the result to self[attr].
If both self[attr] and value are non-seq... | (self, attr, value, replace) | [
0.006132681388407946,
0.036840494722127914,
0.042560186237096786,
-0.0050979857333004475,
-0.034318145364522934,
-0.013970611616969109,
0.03337670862674713,
-0.006709979381412268,
0.08874402940273285,
-0.021724168211221695,
-0.01123510766774416,
0.002306971698999405,
0.06256134063005447,
0... |
5,202 | docutils.nodes | copy_attr_concatenate |
If attr is an attribute of self and both self[attr] and value are
lists, concatenate the two sequences, setting the result to
self[attr]. If either self[attr] or value are non-sequences and
replace is True or self[attr] is None, replace self[attr] with value.
Otherwise, do noth... | def copy_attr_concatenate(self, attr, value, replace):
"""
If attr is an attribute of self and both self[attr] and value are
lists, concatenate the two sequences, setting the result to
self[attr]. If either self[attr] or value are non-sequences and
replace is True or self[attr] is None, replace sel... | (self, attr, value, replace) | [
-0.014666874893009663,
0.019983507692813873,
0.02998404949903488,
-0.004512546584010124,
-0.023393182083964348,
-0.023850150406360626,
-0.0014093469362705946,
-0.034307658672332764,
0.09357272833585739,
-0.02509802021086216,
-0.015615959651768208,
-0.007408134173601866,
0.05866749957203865,
... |
5,203 | docutils.nodes | copy_attr_consistent |
If replace is True or self[attr] is None, replace self[attr] with
value. Otherwise, do nothing.
| def copy_attr_consistent(self, attr, value, replace):
"""
If replace is True or self[attr] is None, replace self[attr] with
value. Otherwise, do nothing.
"""
if self.get(attr) is not value:
self.replace_attr(attr, value, replace)
| (self, attr, value, replace) | [
0.07154568284749985,
0.024333056062459946,
0.028761912137269974,
0.0025927615351974964,
-0.032677773386240005,
-0.039500605314970016,
0.017065629363059998,
-0.004454505629837513,
0.08296836912631989,
-0.013568714261054993,
-0.04849511384963989,
0.000493490369990468,
0.06709972769021988,
0.... |
5,204 | docutils.nodes | copy_attr_convert |
If attr is an attribute of self, set self[attr] to
[self[attr], value], otherwise set self[attr] to value.
NOTE: replace is not used by this function and is kept only for
compatibility with the other copy functions.
| def copy_attr_convert(self, attr, value, replace=True):
"""
If attr is an attribute of self, set self[attr] to
[self[attr], value], otherwise set self[attr] to value.
NOTE: replace is not used by this function and is kept only for
compatibility with the other copy functions.
"""
if sel... | (self, attr, value, replace=True) | [
0.03340419754385948,
0.030578091740608215,
0.03788032382726669,
-0.016982953995466232,
-0.05132625997066498,
-0.010953346267342567,
0.059225305914878845,
0.03380792587995529,
0.08186924457550049,
-0.008530971594154835,
-0.02634771354496479,
0.0019308783812448382,
0.0663871094584465,
0.0324... |
5,205 | docutils.nodes | deepcopy | null | def deepcopy(self):
copy = self.copy()
copy.extend([child.deepcopy() for child in self.children])
return copy
| (self) | [
-0.019303256645798683,
-0.020074669271707535,
0.013338263146579266,
-0.020361706614494324,
-0.0896991491317749,
0.028811365365982056,
0.002394967246800661,
0.0168006494641304,
0.07750006020069122,
0.02918810211122036,
-0.01742854341864586,
-0.03623845428228378,
-0.022424787282943726,
0.055... |
5,206 | releases.models | default_spec |
Given the current release-lines structure, return a default Spec.
Specifics:
* For feature-like issues, only the highest major release is used, so
given a ``manager`` with top level keys of ``[1, 2]``, this would
return ``Spec(">=2")``.
* When ``releases_alway... | def default_spec(self, manager):
"""
Given the current release-lines structure, return a default Spec.
Specifics:
* For feature-like issues, only the highest major release is used, so
given a ``manager`` with top level keys of ``[1, 2]``, this would
return ``Spec(">=2")``.
* When ``r... | (self, manager) | [
0.10971789062023163,
0.00018781035032588989,
-0.06621918082237244,
-0.009408839978277683,
-0.003078257432207465,
-0.05156081169843674,
0.016902931034564972,
0.01901923306286335,
-0.030471084639430046,
0.018927618861198425,
0.05680117756128311,
0.028107421472668648,
-0.0348319485783577,
0.0... |
5,207 | docutils.nodes | delattr | null | def delattr(self, attr):
if attr in self.attributes:
del self.attributes[attr]
| (self, attr) | [
0.07059371471405029,
0.05944912135601044,
0.05724730342626572,
0.004041608888655901,
-0.02635408379137516,
-0.044510625302791595,
-0.028081664815545082,
0.04102158918976784,
0.004067014437168837,
0.04119095951318741,
-0.030249610543251038,
0.031079526990652084,
0.037972915917634964,
0.0250... |
5,208 | docutils.nodes | emptytag | null | def emptytag(self):
attributes = ('%s="%s"' % (n, v) for n, v in self.attlist())
return '<%s/>' % ' '.join((self.tagname, *attributes))
| (self) | [
0.04617743194103241,
0.0016435887664556503,
0.07617183774709702,
-0.05112999677658081,
0.009163988754153252,
-0.014465325511991978,
0.0015803738497197628,
-0.04813055694103241,
0.06961492449045181,
0.0035378574393689632,
-0.015537799336016178,
0.04056220129132271,
0.006827214732766151,
0.0... |
5,209 | docutils.nodes | endtag | null | def endtag(self):
return '</%s>' % self.tagname
| (self) | [
0.03136579692363739,
0.009304279461503029,
0.03949641063809395,
0.001977371983230114,
-0.006323338020592928,
-0.02165328711271286,
-0.034801747649908066,
0.010409906506538391,
0.009406337514519691,
-0.010954215191304684,
0.004345966037362814,
-0.03435949608683586,
-0.004681906662881374,
0.... |
5,210 | docutils.nodes | extend | null | def extend(self, item):
for node in item:
self.append(node)
| (self, item) | [
-0.028533518314361572,
-0.01747221313416958,
-0.030875325202941895,
0.025344673544168472,
-0.012215601280331612,
0.02710518054664135,
-0.028550127521157265,
-0.0026490665040910244,
0.042717233300209045,
0.05072256177663803,
0.015279881656169891,
-0.055904436856508255,
0.034612253308296204,
... |
5,211 | docutils.nodes | findall |
Return an iterator yielding nodes following `self`:
* self (if `include_self` is true)
* all descendants in tree traversal order (if `descend` is true)
* the following siblings (if `siblings` is true) and their
descendants (if also `descend` is true)
* the following s... | def findall(self, condition=None, include_self=True, descend=True,
siblings=False, ascend=False):
"""
Return an iterator yielding nodes following `self`:
* self (if `include_self` is true)
* all descendants in tree traversal order (if `descend` is true)
* the following siblings (if `sibl... | (self, condition=None, include_self=True, descend=True, siblings=False, ascend=False) | [
-0.002044262830168009,
-0.07994924485683441,
-0.01978183351457119,
-0.011730870231986046,
-0.030074365437030792,
0.034071825444698334,
-0.018642369657754898,
-0.042515065521001816,
0.03580904379487038,
-0.004312682431191206,
0.0001477595797041431,
-0.012328621931374073,
0.05887850746512413,
... |
5,212 | docutils.nodes | first_child_matching_class |
Return the index of the first child whose class exactly matches.
Parameters:
- `childclass`: A `Node` subclass to search for, or a tuple of `Node`
classes. If a tuple, any of the classes may match.
- `start`: Initial index to check.
- `end`: Initial index to *not* ch... | def first_child_matching_class(self, childclass, start=0, end=sys.maxsize):
"""
Return the index of the first child whose class exactly matches.
Parameters:
- `childclass`: A `Node` subclass to search for, or a tuple of `Node`
classes. If a tuple, any of the classes may match.
- `start`: Initi... | (self, childclass, start=0, end=9223372036854775807) | [
0.011370026506483555,
-0.0538044311106205,
-0.0017952673370018601,
-0.017291730269789696,
-0.05780582129955292,
0.010083865374326706,
0.03419046476483345,
0.0706317126750946,
-0.0026638731360435486,
-0.05894907936453819,
0.007855411618947983,
0.03997819125652313,
0.015014151111245155,
-0.0... |
5,213 | docutils.nodes | first_child_not_matching_class |
Return the index of the first child whose class does *not* match.
Parameters:
- `childclass`: A `Node` subclass to skip, or a tuple of `Node`
classes. If a tuple, none of the classes may match.
- `start`: Initial index to check.
- `end`: Initial index to *not* check.... | def first_child_not_matching_class(self, childclass, start=0,
end=sys.maxsize):
"""
Return the index of the first child whose class does *not* match.
Parameters:
- `childclass`: A `Node` subclass to skip, or a tuple of `Node`
classes. If a tuple, none of the clas... | (self, childclass, start=0, end=9223372036854775807) | [
0.009456915780901909,
-0.0276984553784132,
0.009196962229907513,
-0.016672857105731964,
-0.07823693007230759,
-0.010200919583439827,
0.02651521936058998,
0.07472307980060577,
0.010962851345539093,
-0.059448592364788055,
0.021316157653927803,
0.03669821098446846,
0.005705523304641247,
-0.04... |
5,214 | docutils.nodes | get | null | def get(self, key, failobj=None):
return self.attributes.get(key, failobj)
| (self, key, failobj=None) | [
0.07516250759363174,
-0.03498460352420807,
-0.028247348964214325,
0.030510645359754562,
0.03408981114625931,
-0.04000245779752731,
0.05698595568537712,
-0.002930004382506013,
0.02417692355811596,
-0.01665891706943512,
-0.031054537743330002,
0.02682620845735073,
0.030668549239635468,
0.0271... |
5,215 | docutils.nodes | get_language_code | Return node's language tag.
Look iteratively in self and parents for a class argument
starting with ``language-`` and return the remainder of it
(which should be a `BCP49` language tag) or the `fallback`.
| def get_language_code(self, fallback=''):
"""Return node's language tag.
Look iteratively in self and parents for a class argument
starting with ``language-`` and return the remainder of it
(which should be a `BCP49` language tag) or the `fallback`.
"""
for cls in self.get('classes', []):
... | (self, fallback='') | [
0.04023120924830437,
-0.06600766628980637,
0.04984397813677788,
0.04984397813677788,
-0.027093762531876564,
-0.026150286197662354,
0.016751136630773544,
0.02568744868040085,
0.12297221273183823,
-0.08936312794685364,
0.0058611175045371056,
-0.02750319428741932,
0.013707093894481659,
-0.033... |
5,216 | docutils.nodes | hasattr | null | def hasattr(self, attr):
return attr in self.attributes
| (self, attr) | [
0.0520855188369751,
0.0051613240502774715,
0.021185042336583138,
0.00966483261436224,
0.038591861724853516,
0.005709503777325153,
0.028657155111432076,
-0.012405731715261936,
-0.008703408762812614,
0.03130528703331947,
-0.010390115901827812,
0.02691984735429287,
0.09796395152807236,
0.0052... |
5,218 | docutils.nodes | index | null | def index(self, item, start=0, stop=sys.maxsize):
return self.children.index(item, start, stop)
| (self, item, start=0, stop=9223372036854775807) | [
0.04015931859612465,
-0.0037649362348020077,
-0.016247792169451714,
0.006392024923115969,
-0.01690874621272087,
0.00004447984611033462,
0.015720700845122337,
0.05562065914273262,
-0.025199972093105316,
-0.03761589527130127,
-0.019309939816594124,
0.016306357458233833,
0.004940432962030172,
... |
5,219 | docutils.nodes | insert | null | def insert(self, index, item):
if isinstance(item, Node):
self.setup_child(item)
self.children.insert(index, item)
elif item is not None:
self[index:index] = item
| (self, index, item) | [
-0.031179154291749,
0.030004236847162247,
-0.023708783090114594,
-0.02844352461397648,
-0.007772868499159813,
0.03249435871839523,
-0.0025471157860010862,
0.04962711036205292,
0.013327422551810741,
0.015607113018631935,
-0.0036365450359880924,
0.0031806067563593388,
0.022112999111413956,
-... |
5,220 | docutils.nodes | is_not_default | null | def is_not_default(self, key):
if self[key] == [] and key in self.list_attributes:
return 0
else:
return 1
| (self, key) | [
0.08696971088647842,
-0.022241264581680298,
0.020366324111819267,
0.034488581120967865,
-0.005091581027954817,
-0.00010206545266555622,
0.02317013405263424,
-0.020383525639772415,
0.090547576546669,
0.007852387614548206,
-0.042177557945251465,
0.019385850057005882,
0.029723824933171272,
-0... |
5,221 | releases.models | minor_releases |
Return all minor release line labels found in ``manager``.
| def minor_releases(self, manager):
"""
Return all minor release line labels found in ``manager``.
"""
# TODO: yea deffo need a real object for 'manager', heh. E.g. we do a
# very similar test for "do you have any actual releases yet?"
# elsewhere. (This may be fodder for changing how we roll up
... | (self, manager) | [
0.12087389081716537,
0.037618912756443024,
-0.06400012224912643,
0.009576034732162952,
0.0036102852318435907,
-0.05163178965449333,
0.01015847735106945,
0.014783754013478756,
0.04053112491965294,
-0.02170453779399395,
0.008364041335880756,
0.007957188412547112,
0.014055700972676277,
-0.034... |
5,222 | docutils.nodes | next_node |
Return the first node in the iterator returned by findall(),
or None if the iterable is empty.
Parameter list is the same as of `findall()`. Note that `include_self`
defaults to False, though.
| def next_node(self, condition=None, include_self=False, descend=True,
siblings=False, ascend=False):
"""
Return the first node in the iterator returned by findall(),
or None if the iterable is empty.
Parameter list is the same as of `findall()`. Note that `include_self`
defaults to Fa... | (self, condition=None, include_self=False, descend=True, siblings=False, ascend=False) | [
-0.02558140456676483,
-0.07254941761493683,
-0.0008015679195523262,
-0.018945368006825447,
-0.011750598438084126,
0.02700832486152649,
0.011690427549183369,
-0.02095681056380272,
-0.009274978190660477,
0.008956930600106716,
0.0011411060113459826,
0.016693241894245148,
0.0533289797604084,
0... |
5,223 | docutils.nodes | non_default_attributes | null | def non_default_attributes(self):
atts = {}
for key, value in self.attributes.items():
if self.is_not_default(key):
atts[key] = value
return atts
| (self) | [
0.05348252132534981,
0.008801433257758617,
0.03678720444440842,
-0.04223250225186348,
-0.023021206259727478,
-0.034127455204725266,
-0.0010760301956906915,
-0.04456876590847969,
0.09711678326129913,
0.026669375598430634,
-0.032114673405885696,
0.027388226240873337,
-0.0006924557965248823,
... |
5,224 | docutils.nodes | note_referenced_by | Note that this Element has been referenced by its name
`name` or id `id`. | def note_referenced_by(self, name=None, id=None):
"""Note that this Element has been referenced by its name
`name` or id `id`."""
self.referenced = True
# Element.expect_referenced_by_* dictionaries map names or ids
# to nodes whose ``referenced`` attribute is set to true as
# soon as this node ... | (self, name=None, id=None) | [
0.015092562884092331,
-0.006663853302598,
0.0030211207922548056,
0.04016569256782532,
-0.017222560942173004,
0.0024321109522134066,
0.024534108117222786,
0.01921345852315426,
0.01973509043455124,
0.012319217436015606,
-0.035783980041742325,
-0.08158329874277115,
0.0644042119383812,
-0.0119... |
5,225 | docutils.nodes | pformat | null | def pformat(self, indent=' ', level=0):
tagline = '%s%s\n' % (indent*level, self.starttag())
childreps = (c.pformat(indent, level+1) for c in self.children)
return ''.join((tagline, *childreps))
| (self, indent=' ', level=0) | [
0.027891606092453003,
-0.013154740445315838,
0.04582827165722847,
0.019874325022101402,
0.023731863126158714,
-0.040921907871961594,
0.016718965023756027,
-0.04952581971883774,
0.010977097786962986,
0.023447437211871147,
-0.0136435991153121,
-0.012603663839399815,
0.014043574221432209,
0.0... |
5,226 | docutils.nodes | pop | null | def pop(self, i=-1):
return self.children.pop(i)
| (self, i=-1) | [
0.026423169299960136,
0.024821264669299126,
-0.05697495862841606,
-0.018463188782334328,
-0.06348166614770889,
0.0034969414118677378,
-0.003063436131924391,
0.04240918532013893,
0.020263267681002617,
-0.021733056753873825,
-0.006440647412091494,
-0.00454148231074214,
-0.041913751512765884,
... |
5,227 | docutils.nodes | previous_sibling | Return preceding sibling node or ``None``. | def previous_sibling(self):
"""Return preceding sibling node or ``None``."""
try:
i = self.parent.index(self)
except (AttributeError):
return None
return self.parent[i-1] if i > 0 else None
| (self) | [
-0.04452582821249962,
-0.01639510504901409,
0.016800638288259506,
0.06528247892856598,
-0.06763291358947754,
0.007407178170979023,
0.01711513288319111,
0.06078024208545685,
0.08640328049659729,
0.026417555287480354,
0.0173137616366148,
-0.07541251927614212,
0.06134302169084549,
-0.02966181... |
5,228 | docutils.nodes | remove | null | def remove(self, item):
self.children.remove(item)
| (self, item) | [
0.04889468848705292,
0.054926492273807526,
-0.025458261370658875,
-0.00988171435892582,
-0.05004039406776428,
-0.025643596425652504,
-0.026216449216008186,
0.09745240211486816,
0.05175895243883133,
0.03915618732571602,
-0.005669559817761183,
0.010892631486058235,
0.01991506665945053,
0.005... |
5,229 | docutils.nodes | replace | Replace one child `Node` with another child or children. | def replace(self, old, new):
"""Replace one child `Node` with another child or children."""
index = self.index(old)
if isinstance(new, Node):
self.setup_child(new)
self[index] = new
elif new is not None:
self[index:index+1] = new
| (self, old, new) | [
0.014830020256340504,
-0.019761405885219574,
-0.01154840737581253,
-0.03469901904463768,
-0.10630273073911667,
0.006473563611507416,
-0.018685465678572655,
0.08614681661128998,
0.09030710905790329,
0.0011258127633482218,
-0.016201840713620186,
-0.0374067984521389,
0.03315684199333191,
0.02... |
5,230 | docutils.nodes | replace_attr |
If self[attr] does not exist or force is True or omitted, set
self[attr] to value, otherwise do nothing.
| def replace_attr(self, attr, value, force=True):
"""
If self[attr] does not exist or force is True or omitted, set
self[attr] to value, otherwise do nothing.
"""
# One or the other
if force or self.get(attr) is None:
self[attr] = value
| (self, attr, value, force=True) | [
0.09118098765611649,
0.031540270894765854,
0.04244159907102585,
-0.005989741999655962,
-0.007992027327418327,
-0.02652600035071373,
0.001204365980811417,
0.031386248767375946,
0.07249299436807632,
-0.012587014585733414,
-0.03809475898742676,
0.01750716008245945,
0.0376155786216259,
0.02662... |
5,231 | docutils.nodes | replace_self |
Replace `self` node with `new`, where `new` is a node or a
list of nodes.
| def replace_self(self, new):
"""
Replace `self` node with `new`, where `new` is a node or a
list of nodes.
"""
update = new
if not isinstance(new, Node):
# `new` is a list; update first child.
try:
update = new[0]
except IndexError:
update = None
... | (self, new) | [
0.03610813990235329,
-0.025882026180624962,
0.044234734028577805,
0.011212527751922607,
-0.084342822432518,
-0.028452128171920776,
0.0037171475123614073,
0.049555934965610504,
0.09071378409862518,
0.06664168834686279,
-0.04347456246614456,
-0.06269603967666626,
0.08231569826602936,
0.05494... |
5,232 | docutils.nodes | set_class | Add a new class to the "classes" attribute. | def set_class(self, name):
"""Add a new class to the "classes" attribute."""
warnings.warn('docutils.nodes.Element.set_class() is deprecated; '
' and will be removed in Docutils 0.21 or later.'
"Append to Element['classes'] list attribute directly",
Deprecat... | (self, name) | [
0.0002538721892051399,
0.02052641287446022,
0.0022950046695768833,
0.02198871597647667,
-0.053256742656230927,
-0.008629397489130497,
-0.026411734521389008,
0.02659226581454277,
0.04585495963692665,
0.04358026385307312,
-0.000563032110221684,
-0.00961329322308302,
0.06820473819971085,
0.01... |
5,233 | docutils.nodes | setdefault | null | def setdefault(self, key, failobj=None):
return self.attributes.setdefault(key, failobj)
| (self, key, failobj=None) | [
0.04760914668440819,
-0.018645472824573517,
-0.00559191033244133,
0.02993316762149334,
-0.023977696895599365,
-0.034555584192276,
0.03147397190332413,
0.05488035827875137,
0.011616631411015987,
-0.002668276196345687,
-0.03552507981657982,
0.02624562382698059,
-0.0043562366627156734,
0.0585... |
5,234 | docutils.nodes | setup_child | null | def setup_child(self, child):
child.parent = self
if self.document:
child.document = self.document
if child.source is None:
child.source = self.document.current_source
if child.line is None:
child.line = self.document.current_line
| (self, child) | [
-0.012917269952595234,
0.032145000994205475,
0.0069903177209198475,
0.05072773993015289,
-0.045672398060560226,
0.02111040987074375,
0.057142794132232666,
0.11031104624271393,
0.027403438463807106,
0.006641673389822245,
0.0012551193358376622,
-0.008707390166819096,
0.047764264047145844,
0.... |
5,235 | docutils.nodes | shortrepr | null | def shortrepr(self):
if self['names']:
return '<%s "%s"...>' % (self.__class__.__name__,
'; '.join(self['names']))
else:
return '<%s...>' % self.tagname
| (self) | [
0.022624971345067024,
-0.045916929841041565,
0.09000841528177261,
-0.02785556949675083,
0.038018375635147095,
-0.0443723239004612,
0.042511776089668274,
-0.041248008608818054,
0.07540486752986908,
-0.02397650107741356,
-0.052481506019830704,
0.00962746050208807,
-0.009039456956088543,
0.03... |
5,236 | docutils.nodes | starttag | null | def starttag(self, quoteattr=None):
# the optional arg is used by the docutils_xml writer
if quoteattr is None:
quoteattr = pseudo_quoteattr
parts = [self.tagname]
for name, value in self.attlist():
if value is None: # boolean attribute
parts.append('%s="True"' % na... | (self, quoteattr=None) | [
0.029386749491095543,
0.050264835357666016,
0.07474129647016525,
-0.051989056169986725,
0.05082708224654198,
0.016708090901374817,
0.022115027531981468,
-0.02606949396431446,
-0.009305179119110107,
-0.022827206179499626,
-0.0014337284956127405,
0.07140529900789261,
0.04134385660290718,
0.0... |
5,237 | docutils.nodes | traverse | Return list of nodes following `self`.
For looping, Node.findall() is faster and more memory efficient.
| def traverse(self, condition=None, include_self=True, descend=True,
siblings=False, ascend=False):
"""Return list of nodes following `self`.
For looping, Node.findall() is faster and more memory efficient.
"""
# traverse() may be eventually removed:
warnings.warn('nodes.Node.traverse() ... | (self, condition=None, include_self=True, descend=True, siblings=False, ascend=False) | [
-0.03429905325174332,
-0.06177259236574173,
-0.04596073180437088,
-0.030268913134932518,
-0.013136536814272404,
0.040987368673086166,
-0.023854991421103477,
-0.012604901567101479,
0.03387031331658363,
0.022260084748268127,
0.01041833683848381,
-0.03522512689232826,
0.06928408890962601,
-0.... |
5,238 | docutils.nodes | update_all_atts |
Updates all attributes from node or dictionary `dict_`.
Appends the basic attributes ('ids', 'names', 'classes',
'dupnames', but not 'source') and then, for all other attributes in
dict_, updates the same attribute in self. When attributes with the
same identifier appear in bo... | def update_all_atts(self, dict_, update_fun=copy_attr_consistent,
replace=True, and_source=False):
"""
Updates all attributes from node or dictionary `dict_`.
Appends the basic attributes ('ids', 'names', 'classes',
'dupnames', but not 'source') and then, for all other attributes in
... | (self, dict_, update_fun=<function Element.copy_attr_consistent at 0x7fc41c59f760>, replace=True, and_source=False) | [
0.01684429682791233,
-0.025449536740779877,
0.012175497598946095,
-0.005396583583205938,
-0.04969067871570587,
-0.03572089597582817,
-0.016606280580163002,
-0.012678995728492737,
0.07689788192510605,
0.010784012265503407,
-0.0789484903216362,
-0.030008481815457344,
0.07704435288906097,
0.0... |
5,239 | docutils.nodes | update_all_atts_coercion |
Updates all attributes from node or dictionary `dict_`.
Appends the basic attributes ('ids', 'names', 'classes',
'dupnames', but not 'source') and then, for all other attributes in
dict_, updates the same attribute in self. When attributes with the
same identifier appear in bo... | def update_all_atts_coercion(self, dict_, replace=True,
and_source=False):
"""
Updates all attributes from node or dictionary `dict_`.
Appends the basic attributes ('ids', 'names', 'classes',
'dupnames', but not 'source') and then, for all other attributes in
dict_, upda... | (self, dict_, replace=True, and_source=False) | [
-0.007787597831338644,
-0.01383370254188776,
0.047725826501846313,
-0.02875695377588272,
-0.04190298914909363,
-0.027560235932469368,
0.010761531069874763,
0.010984799824655056,
0.11066962033510208,
0.002985097002238035,
-0.062372226268053055,
-0.038402143865823746,
0.07001693546772003,
0.... |
5,240 | docutils.nodes | update_all_atts_concatenating |
Updates all attributes from node or dictionary `dict_`.
Appends the basic attributes ('ids', 'names', 'classes',
'dupnames', but not 'source') and then, for all other attributes in
dict_, updates the same attribute in self. When attributes with the
same identifier appear in bo... | def update_all_atts_concatenating(self, dict_, replace=True,
and_source=False):
"""
Updates all attributes from node or dictionary `dict_`.
Appends the basic attributes ('ids', 'names', 'classes',
'dupnames', but not 'source') and then, for all other attributes in
d... | (self, dict_, replace=True, and_source=False) | [
-0.024466227740049362,
-0.021567976102232933,
0.021425731480121613,
-0.03490349277853966,
-0.024252859875559807,
-0.03476124629378319,
-0.006996701471507549,
-0.017220597714185715,
0.09402428567409515,
-0.001804739935323596,
-0.05067496374249458,
-0.048043422400951385,
0.05757387354969978,
... |
5,241 | docutils.nodes | update_all_atts_consistantly |
Updates all attributes from node or dictionary `dict_`.
Appends the basic attributes ('ids', 'names', 'classes',
'dupnames', but not 'source') and then, for all other attributes in
dict_, updates the same attribute in self. When attributes with the
same identifier appear in bo... | def update_all_atts_consistantly(self, dict_, replace=True,
and_source=False):
"""
Updates all attributes from node or dictionary `dict_`.
Appends the basic attributes ('ids', 'names', 'classes',
'dupnames', but not 'source') and then, for all other attributes in
dic... | (self, dict_, replace=True, and_source=False) | [
0.010463989339768887,
0.004577995743602514,
0.0015581863699480891,
-0.027775220572948456,
-0.032024022191762924,
-0.0379582978785038,
-0.01422997284680605,
-0.009919721633195877,
0.08525693416595459,
0.016459714621305466,
-0.08181575685739517,
-0.03098815679550171,
0.06288927793502808,
0.0... |
5,242 | docutils.nodes | update_all_atts_convert |
Updates all attributes from node or dictionary `dict_`.
Appends the basic attributes ('ids', 'names', 'classes',
'dupnames', but not 'source') and then, for all other attributes in
dict_, updates the same attribute in self. When attributes with the
same identifier appear in bo... | def update_all_atts_convert(self, dict_, and_source=False):
"""
Updates all attributes from node or dictionary `dict_`.
Appends the basic attributes ('ids', 'names', 'classes',
'dupnames', but not 'source') and then, for all other attributes in
dict_, updates the same attribute in self. When attrib... | (self, dict_, and_source=False) | [
-0.012992273084819317,
-0.028232527896761894,
0.03180805966258049,
-0.02069205418229103,
-0.04903078451752663,
-0.022603724151849747,
0.006456310395151377,
0.018762683495879173,
0.08156456798315048,
0.01604563370347023,
-0.06085481494665146,
-0.03191426396369934,
0.07101498544216156,
0.085... |
5,243 | docutils.nodes | update_basic_atts |
Update basic attributes ('ids', 'names', 'classes',
'dupnames', but not 'source') from node or dictionary `dict_`.
| def update_basic_atts(self, dict_):
"""
Update basic attributes ('ids', 'names', 'classes',
'dupnames', but not 'source') from node or dictionary `dict_`.
"""
if isinstance(dict_, Node):
dict_ = dict_.attributes
for att in self.basic_attributes:
self.append_attr_list(att, dict_.g... | (self, dict_) | [
0.018408678472042084,
0.03462910279631615,
0.04081092029809952,
-0.010275671258568764,
-0.005725928582251072,
-0.014579235576093197,
0.0023261585738509893,
0.03544969856739044,
0.06601230055093765,
0.015071592293679714,
-0.06196403130888939,
-0.009012866765260696,
0.05240865796804428,
0.07... |
5,244 | docutils.nodes | walk |
Traverse a tree of `Node` objects, calling the
`dispatch_visit()` method of `visitor` when entering each
node. (The `walkabout()` method is similar, except it also
calls the `dispatch_departure()` method before exiting each
node.)
This tree traversal supports limited i... | def walk(self, visitor):
"""
Traverse a tree of `Node` objects, calling the
`dispatch_visit()` method of `visitor` when entering each
node. (The `walkabout()` method is similar, except it also
calls the `dispatch_departure()` method before exiting each
node.)
This tree traversal supports li... | (self, visitor) | [
-0.020579084753990173,
-0.01605946570634842,
-0.04452935978770256,
0.009789420291781425,
-0.06305238604545593,
0.022153541445732117,
0.022375818341970444,
-0.0024218859616667032,
0.02789568156003952,
0.0006784059223718941,
0.013151350431144238,
-0.02437630482017994,
0.06053325906395912,
0.... |
5,245 | docutils.nodes | walkabout |
Perform a tree traversal similarly to `Node.walk()` (which
see), except also call the `dispatch_departure()` method
before exiting each node.
Parameter `visitor`: A `NodeVisitor` object, containing a
``visit`` and ``depart`` implementation for each `Node`
subclass encou... | def walkabout(self, visitor):
"""
Perform a tree traversal similarly to `Node.walk()` (which
see), except also call the `dispatch_departure()` method
before exiting each node.
Parameter `visitor`: A `NodeVisitor` object, containing a
``visit`` and ``depart`` implementation for each `Node`
su... | (self, visitor) | [
-0.03775088116526604,
-0.0018209615955129266,
-0.028384657576680183,
0.006828047335147858,
-0.04604463279247284,
0.03079771250486374,
0.03170930966734886,
-0.010688932612538338,
0.002270057797431946,
-0.0007121859234757721,
0.022307338193058968,
-0.014245952479541302,
0.07435779273509979,
... |
5,246 | releases.line_manager | LineManager |
Manages multiple release lines/families as well as related config state.
| class LineManager(dict):
"""
Manages multiple release lines/families as well as related config state.
"""
def __init__(self, app):
"""
Initialize new line manager dict.
:param app: The core Sphinx app object. Mostly used for config.
"""
super().__init__()
... | (app) | [
0.04662160947918892,
0.014457094483077526,
-0.08731023222208023,
0.010062283836305141,
0.004612261895090342,
-0.017798980697989464,
-0.04002939537167549,
0.02706470526754856,
-0.009073452092707157,
-0.02475742995738983,
0.006958449259400368,
0.00209211278706789,
0.038747575134038925,
0.014... |
5,247 | releases.line_manager | __init__ |
Initialize new line manager dict.
:param app: The core Sphinx app object. Mostly used for config.
| def __init__(self, app):
"""
Initialize new line manager dict.
:param app: The core Sphinx app object. Mostly used for config.
"""
super().__init__()
self.app = app
| (self, app) | [
-0.0012366794981062412,
-0.019821373745799065,
0.02428937703371048,
-0.013015863485634327,
-0.0037520877085626125,
0.025755710899829865,
0.007672372739762068,
0.06903841346502304,
0.01842404529452324,
0.008608237840235233,
0.007831944152712822,
-0.0291369017213583,
0.045404575765132904,
0.... |
5,248 | releases.line_manager | add_family |
Expand to a new release line with given ``major_number``.
This will flesh out mandatory buckets like ``unreleased_bugfix`` and do
other necessary bookkeeping.
| def add_family(self, major_number):
"""
Expand to a new release line with given ``major_number``.
This will flesh out mandatory buckets like ``unreleased_bugfix`` and do
other necessary bookkeeping.
"""
# Normally, we have separate buckets for bugfixes vs features
keys = ["unreleased_bugfix"... | (self, major_number) | [
0.031574100255966187,
0.024718506261706352,
-0.11136411130428314,
-0.0071346997283399105,
0.0009583436767570674,
-0.03417329117655754,
-0.01604871265590191,
0.004936723504215479,
-0.005455690436065197,
-0.01807224564254284,
0.0012734305346384645,
-0.030701884999871254,
0.005861269310116768,
... |
5,249 | releases.models | Release | null | class Release(nodes.Element):
@property
def number(self):
return self["number"]
@property
def minor(self):
# TODO: use Version
return ".".join(self.number.split(".")[:-1])
@property
def family(self):
# TODO: use Version.major
# TODO: and probs just renam... | (rawsource='', *children, **attributes) | [
0.08704280853271484,
0.014236870221793652,
-0.04543941468000412,
-0.009668516926467419,
0.025788525119423866,
-0.03696529567241669,
-0.018970869481563568,
0.01726209558546543,
0.0066302139312028885,
0.01822110079228878,
-0.0005538800614885986,
0.007964103482663631,
0.04784564673900604,
0.0... |
5,259 | releases.models | __repr__ | null | def __repr__(self):
return "<release {}>".format(self.number)
| (self) | [
0.04802113398909569,
-0.01069426629692316,
-0.02849605679512024,
0.01179090328514576,
0.016243411228060722,
-0.06576520204544067,
-0.004757588263601065,
0.027671517804265022,
0.020349614322185516,
-0.027622045949101448,
-0.052770476788282394,
0.015196247957646847,
0.03166228532791138,
0.04... |
5,316 | semantic_version.base | Spec | null | class Spec(object):
def __init__(self, *specs_strings):
subspecs = [self.parse(spec) for spec in specs_strings]
self.specs = sum(subspecs, ())
@classmethod
def parse(self, specs_string):
spec_texts = specs_string.split(',')
return tuple(SpecItem(spec_text) for spec_text in s... | (*specs_strings) | [
0.13422557711601257,
-0.04195008426904678,
-0.06604750454425812,
-0.0604272224009037,
-0.010340585373342037,
-0.06149250268936157,
0.009344179183244705,
-0.01270073652267456,
-0.0004135430499445647,
0.010524255223572254,
0.008471749722957611,
0.05697423964738846,
-0.03524615243077278,
0.00... |
5,317 | semantic_version.base | __contains__ | null | def __contains__(self, version):
if isinstance(version, Version):
return self.match(version)
return False
| (self, version) | [
0.08033239096403122,
-0.06492380797863007,
-0.06315787881612778,
0.039092790335416794,
0.018386423587799072,
-0.05450137332081795,
0.01170359831303358,
0.003466931404545903,
-0.003975501284003258,
0.019148195162415504,
-0.00865217950195074,
-0.009634693153202534,
0.021658582612872124,
-0.0... |
5,318 | semantic_version.base | __eq__ | null | def __eq__(self, other):
if not isinstance(other, Spec):
return NotImplemented
return set(self.specs) == set(other.specs)
| (self, other) | [
0.07546010613441467,
-0.03815005347132683,
0.002458753529936075,
0.014533770270645618,
-0.05985008180141449,
-0.044240061193704605,
-0.022277530282735825,
0.0005807820707559586,
0.012906268239021301,
0.01905752718448639,
0.028770040720701218,
-0.0644000917673111,
0.036295048892498016,
0.04... |
5,319 | semantic_version.base | __hash__ | null | def __hash__(self):
return hash(self.specs)
| (self) | [
0.07517973333597183,
-0.05223526805639267,
0.012977453880012035,
0.04299239069223404,
-0.021105650812387466,
-0.04689783230423927,
-0.04998964071273804,
-0.018274206668138504,
-0.02208201214671135,
0.028005262836813927,
-0.01215568371117115,
-0.031145887449383736,
0.011830230243504047,
0.0... |
5,320 | semantic_version.base | __init__ | null | def __init__(self, *specs_strings):
subspecs = [self.parse(spec) for spec in specs_strings]
self.specs = sum(subspecs, ())
| (self, *specs_strings) | [
0.008106356486678123,
-0.0038233918603509665,
-0.005123387556523085,
-0.031199898570775986,
-0.055353011935949326,
-0.005221259780228138,
0.008578695356845856,
0.031557343900203705,
-0.01051060389727354,
0.035131800919771194,
0.020833974704146385,
0.07625506818294525,
-0.04639985039830208,
... |
5,321 | semantic_version.base | __iter__ | null | def __iter__(self):
return iter(self.specs)
| (self) | [
0.08371604979038239,
-0.05176310986280441,
-0.049031805247068405,
-0.03419063612818718,
-0.031344156712293625,
-0.00806639064103365,
0.005224026273936033,
0.02111000195145607,
0.04340466484427452,
0.06393878906965256,
0.020830290392041206,
-0.018707772716879845,
-0.011945332400500774,
0.03... |
5,322 | semantic_version.base | __repr__ | null | def __repr__(self):
return '<Spec: %r>' % (self.specs,)
| (self) | [
0.07438507676124573,
-0.03935527428984642,
0.03765130043029785,
-0.007889077998697758,
0.0028897945303469896,
-0.043910130858421326,
-0.008708296343684196,
0.0034652957692742348,
0.030147254467010498,
0.01753128319978714,
-0.0070534744299948215,
0.0003427919000387192,
-0.029213344678282738,
... |
5,323 | semantic_version.base | __str__ | null | def __str__(self):
return ','.join(str(spec) for spec in self.specs)
| (self) | [
0.03605484962463379,
-0.02905636467039585,
0.014334248378872871,
-0.03296877071261406,
0.009949655272066593,
-0.05622398108243942,
0.0034950270783156157,
-0.04131636396050453,
0.05652753263711929,
-0.013609103858470917,
-0.005046498496085405,
-0.0375051386654377,
-0.04070926457643509,
0.02... |
5,324 | semantic_version.base | filter | Filter an iterable of versions satisfying the Spec. | def filter(self, versions):
"""Filter an iterable of versions satisfying the Spec."""
for version in versions:
if self.match(version):
yield version
| (self, versions) | [
0.0964527577161789,
-0.05383409932255745,
-0.06640898436307907,
-0.043230410665273666,
-0.054717738181352615,
-0.0488041453063488,
-0.004970477893948555,
-0.0017587845213711262,
0.05845621973276138,
0.060563359409570694,
0.004537153989076614,
-0.012812787666916847,
-0.005314587615430355,
-... |
5,325 | semantic_version.base | match | Check whether a Version satisfies the Spec. | def match(self, version):
"""Check whether a Version satisfies the Spec."""
return all(spec.match(version) for spec in self.specs)
| (self, version) | [
0.13090255856513977,
-0.0403069369494915,
-0.041861191391944885,
-0.005508960224688053,
-0.0015585694927722216,
-0.03837275877594948,
-0.006316307932138443,
-0.04548777639865875,
-0.04130856692790985,
0.06638383120298386,
0.022571194916963577,
-0.001973036676645279,
0.03609318658709526,
-0... |
5,326 | semantic_version.base | select | Select the best compatible version among an iterable of options. | def select(self, versions):
"""Select the best compatible version among an iterable of options."""
options = list(self.filter(versions))
if options:
return max(options)
return None
| (self, versions) | [
0.07304917275905609,
-0.0435761958360672,
-0.033033017069101334,
-0.0084080146625638,
-0.008549218066036701,
-0.03909192234277725,
0.042035795748233795,
-0.008626238442957401,
0.03936576843261719,
-0.005211685784161091,
0.00786459632217884,
0.014291485771536827,
-0.04569852352142334,
-0.03... |
5,327 | releases.models | Version |
Version subclass toggling ``partial=True`` by default.
| class Version(StrictVersion):
"""
Version subclass toggling ``partial=True`` by default.
"""
def __init__(self, version_string, partial=True):
super().__init__(version_string, partial)
| (version_string, partial=True) | [
0.027235206216573715,
-0.01763251982629299,
0.019321268424391747,
-0.003242976265028119,
0.011961967684328556,
-0.062020111829042435,
0.0005277338786982,
0.01638251543045044,
0.024950429797172546,
-0.03342728316783905,
-0.01875835284590721,
0.03854319825768471,
-0.0356292799115181,
0.03500... |
5,328 | semantic_version.base | __compare | null | def __compare(self, other):
comparison_functions = self._comparison_functions(partial=self.partial or other.partial)
comparisons = zip(comparison_functions, self, other)
for cmp_fun, self_field, other_field in comparisons:
cmp_res = cmp_fun(self_field, other_field)
if cmp_res != 0:
... | (self, other) | [
0.02701474167406559,
-0.030751392245292664,
0.013435855507850647,
0.06751003116369247,
-0.0006637473707087338,
-0.05803431570529938,
-0.005931264255195856,
-0.0003941698232665658,
0.002190142869949341,
-0.03624016046524048,
0.016707660630345345,
-0.0077012572437524796,
0.05803431570529938,
... |
5,329 | semantic_version.base | __compare_helper | Helper for comparison.
Allows the caller to provide:
- The condition
- The return value if the comparison is meaningless (ie versions with
build metadata).
| def __compare_helper(self, other, condition, notimpl_target):
"""Helper for comparison.
Allows the caller to provide:
- The condition
- The return value if the comparison is meaningless (ie versions with
build metadata).
"""
if not isinstance(other, self.__class__):
return NotImp... | (self, other, condition, notimpl_target) | [
0.050847239792346954,
-0.024047957733273506,
-0.02596343494951725,
0.04576251655817032,
-0.01762239821255207,
-0.06756413727998734,
-0.01581140235066414,
0.03122229501605034,
-0.007509544957429171,
-0.05178756266832352,
0.045971475541591644,
-0.02472708187997341,
0.03911058232188225,
-0.04... |
5,330 | semantic_version.base | __cmp__ | null | def __cmp__(self, other):
if not isinstance(other, self.__class__):
return NotImplemented
return self.__compare(other)
| (self, other) | [
-0.01036130078136921,
-0.0006174489390105009,
-0.025019370019435883,
0.03222576156258583,
-0.041682034730911255,
-0.06431619077920914,
-0.003878086805343628,
0.025899022817611694,
0.03297008201479912,
-0.03532146289944649,
0.01864188350737095,
-0.04817793518304825,
0.02525619976222515,
0.0... |
5,331 | semantic_version.base | __eq__ | null | def __eq__(self, other):
return self.__compare_helper(other, lambda x: x == 0, notimpl_target=False)
| (self, other) | [
0.03926146402955055,
-0.04150202125310898,
0.02300880290567875,
0.05663440376520157,
-0.015304732136428356,
-0.0670788511633873,
-0.048775218427181244,
0.00972057320177555,
0.00039802215178497136,
-0.011004584841430187,
0.00042118175770156085,
-0.032367441803216934,
0.07514485716819763,
0.... |
5,332 | semantic_version.base | __ge__ | null | def __ge__(self, other):
return self.__compare_helper(other, lambda x: x >= 0, notimpl_target=False)
| (self, other) | [
0.025613918900489807,
-0.03216592222452164,
-0.0001353949774056673,
0.06090307608246803,
-0.008902915753424168,
-0.04586402326822281,
-0.02678513154387474,
-0.017254173755645752,
-0.000615311146248132,
-0.04521900415420532,
0.02839767187833786,
-0.034610193222761154,
0.06351708620786667,
-... |
5,333 | semantic_version.base | __gt__ | null | def __gt__(self, other):
return self.__compare_helper(other, lambda x: x > 0, notimpl_target=False)
| (self, other) | [
0.007905721664428711,
-0.01956072449684143,
-0.008813353255391121,
0.0340658575296402,
-0.0031152106821537018,
-0.05293101444840431,
-0.033472079783678055,
0.0017081702826544642,
-0.00902541633695364,
-0.055272191762924194,
0.03718743100762367,
-0.006077735684812069,
0.05835983529686928,
-... |
5,334 | semantic_version.base | __hash__ | null | def __hash__(self):
return hash((self.major, self.minor, self.patch, self.prerelease, self.build))
| (self) | [
0.060999877750873566,
-0.02327803708612919,
-0.01758449152112007,
0.041148047894239426,
0.02237110026180744,
-0.06946461647748947,
-0.04252524673938751,
-0.023210857063531876,
-0.036176688969135284,
-0.008057459257543087,
-0.00020980779663659632,
0.0018967989599332213,
0.00607143621891737,
... |
5,335 | releases.models | __init__ | null | def __init__(self, version_string, partial=True):
super().__init__(version_string, partial)
| (self, version_string, partial=True) | [
0.02579762041568756,
-0.018950307741761208,
0.010436762124300003,
-0.013910156674683094,
-0.003581160679459572,
-0.05895651504397392,
0.024736536666750908,
0.062405042350292206,
0.03105330467224121,
-0.023575974628329277,
-0.013379613868892193,
0.0634329691529274,
-0.06465984880924225,
0.0... |
5,336 | semantic_version.base | __iter__ | null | def __iter__(self):
return iter((self.major, self.minor, self.patch, self.prerelease, self.build))
| (self) | [
0.07497084140777588,
-0.023693615570664406,
-0.08140701800584793,
0.0000017396890825693845,
-0.0007984439143911004,
-0.038935329765081406,
-0.010149355046451092,
0.012120875529944897,
0.04271923378109932,
0.025585567578673363,
0.0015924673061817884,
0.006931266747415066,
-0.01252755708992481... |
5,337 | semantic_version.base | __le__ | null | def __le__(self, other):
return self.__compare_helper(other, lambda x: x <= 0, notimpl_target=False)
| (self, other) | [
-0.018018407747149467,
-0.010850067250430584,
0.006947775837033987,
0.056023333221673965,
0.0014665406197309494,
-0.038208525627851486,
-0.023006554692983627,
-0.010332589037716389,
-0.012716380879282951,
-0.045775577425956726,
0.030013712123036385,
-0.02232789434492588,
0.08598614484071732,... |
5,338 | semantic_version.base | __lt__ | null | def __lt__(self, other):
return self.__compare_helper(other, lambda x: x < 0, notimpl_target=False)
| (self, other) | [
-0.003559838980436325,
-0.016705814749002457,
0.02261345274746418,
0.036615487188100815,
0.009467476047575474,
-0.02625804953277111,
0.006683173589408398,
-0.007081536576151848,
-0.010476097464561462,
-0.04204000160098076,
0.02008766308426857,
-0.03302174434065819,
0.0664503276348114,
0.00... |
5,339 | semantic_version.base | __ne__ | null | def __ne__(self, other):
return self.__compare_helper(other, lambda x: x != 0, notimpl_target=True)
| (self, other) | [
0.006119573954492807,
-0.0033685145899653435,
0.02982393465936184,
0.04141179472208023,
-0.056027721613645554,
-0.07159097492694855,
-0.06069669872522354,
0.0021632080897688866,
0.010623614303767681,
-0.02258363738656044,
0.011435610242187977,
-0.017779327929019928,
0.04100579768419266,
-0... |
5,340 | semantic_version.base | __repr__ | null | def __repr__(self):
return 'Version(%r%s)' % (
str(self),
', partial=True' if self.partial else '',
)
| (self) | [
0.05000931769609451,
-0.05314114689826965,
0.03474998101592064,
-0.0026945394929498434,
0.04594460502266884,
-0.06850043684244156,
0.015084423124790192,
-0.01927407830953598,
0.03811503201723099,
-0.009562075138092041,
-0.025071293115615845,
0.0009021709556691349,
-0.028786176815629005,
0.... |
5,341 | semantic_version.base | __str__ | null | def __str__(self):
version = '%d' % self.major
if self.minor is not None:
version = '%s.%d' % (version, self.minor)
if self.patch is not None:
version = '%s.%d' % (version, self.patch)
if self.prerelease or (self.partial and self.prerelease == () and self.build is None):
version ... | (self) | [
0.05167170614004135,
-0.017314400523900986,
0.016753893345594406,
0.03517179191112518,
0.06046465411782265,
-0.08673840016126633,
0.018461687490344048,
-0.0283231008797884,
0.03513675928115845,
-0.06102515757083893,
-0.009852655231952667,
-0.003328008111566305,
-0.03660808876156807,
-0.005... |
5,342 | semantic_version.base | next_major | null | def next_major(self):
if self.prerelease and self.minor is 0 and self.patch is 0:
return Version('.'.join(str(x) for x in [self.major, self.minor, self.patch]))
else:
return Version('.'.join(str(x) for x in [self.major + 1, 0, 0]))
| (self) | [
0.03901050239801407,
0.02372029796242714,
-0.04293544590473175,
0.05283312499523163,
0.05095597729086876,
-0.042150456458330154,
0.0070734270848333836,
0.015529115684330463,
-0.0048208520747721195,
-0.017781691625714302,
0.047747764736413956,
-0.029402930289506912,
0.009300404228270054,
0.... |
5,343 | semantic_version.base | next_minor | null | def next_minor(self):
if self.prerelease and self.patch is 0:
return Version('.'.join(str(x) for x in [self.major, self.minor, self.patch]))
else:
return Version(
'.'.join(str(x) for x in [self.major, self.minor + 1, 0]))
| (self) | [
0.06412076950073242,
0.03234799578785896,
-0.04490145668387413,
0.06293647736310959,
0.0031996939796954393,
-0.05962046980857849,
0.004567970056086779,
0.05346217006444931,
-0.020606622099876404,
-0.030554644763469696,
0.04266822710633278,
-0.0118175083771348,
-0.005223558750003576,
0.0322... |
5,344 | semantic_version.base | next_patch | null | def next_patch(self):
if self.prerelease:
return Version('.'.join(str(x) for x in [self.major, self.minor, self.patch]))
else:
return Version(
'.'.join(str(x) for x in [self.major, self.minor, self.patch + 1]))
| (self) | [
0.05497076362371445,
0.0002244363131467253,
-0.0511426217854023,
0.06675741076469421,
-0.0021554280538111925,
-0.06581716239452362,
-0.00038197459070943296,
0.04818756505846977,
0.007945911027491093,
-0.024832546710968018,
0.030121425166726112,
-0.034755490720272064,
-0.002203699667006731,
... |
5,345 | releases | _log |
Log debug output if debug setting is on.
Intended to be partial'd w/ config at top of functions. Meh.
| def _log(txt, config):
"""
Log debug output if debug setting is on.
Intended to be partial'd w/ config at top of functions. Meh.
"""
if config.releases_debug:
print(txt, file=sys.stderr, flush=True)
| (txt, config) | [
0.04752734303474426,
-0.012301946058869362,
-0.005032199434936047,
0.009890874847769737,
0.029663490131497383,
-0.04014800116419792,
-0.03287825360894203,
-0.008772100321948528,
0.003041238524019718,
0.0036508559715002775,
-0.007123621646314859,
-0.011918366886675358,
0.030887292698025703,
... |
5,347 | releases | add_role | null | def add_role(app, name, role_obj):
# This (introspecting docutils.parser.rst.roles._roles) is the same trick
# Sphinx uses to emit warnings about double-registering; it's a PITA to try
# and configure the app early on so it doesn't emit those warnings, so we
# instead just...don't double-register. Meh.
... | (app, name, role_obj) | [
0.0020615537650883198,
0.019958103075623512,
0.016170242801308632,
-0.002287954557687044,
0.030146140605211258,
-0.016884276643395424,
0.02688945271074772,
0.011616104282438755,
0.006922640837728977,
0.007066318299621344,
0.048345282673835754,
0.01627473719418049,
0.04677789285778999,
0.02... |
5,348 | releases | append_unreleased_entries |
Generate new abstract 'releases' for unreleased issues.
There's one for each combination of bug-vs-feature & major release line.
When only one major release line exists, that dimension is ignored.
| def append_unreleased_entries(app, manager, releases):
"""
Generate new abstract 'releases' for unreleased issues.
There's one for each combination of bug-vs-feature & major release line.
When only one major release line exists, that dimension is ignored.
"""
for family, lines in manager.items... | (app, manager, releases) | [
0.031297486275434494,
0.028721705079078674,
-0.10684192180633545,
0.008746182546019554,
-0.01228787936270237,
-0.057584550231695175,
-0.000737118418328464,
-0.014854838140308857,
-0.010603037662804127,
0.017633503302931786,
0.02155892178416252,
-0.008485957980155945,
0.014554917812347412,
... |
5,349 | releases | construct_entry_with_release |
Releases 'eat' the entries in their line's list and get added to the
final data structure. They also inform new release-line 'buffers'.
Release lines, once the release obj is removed, should be empty or a
comma-separated list of issue numbers.
| def construct_entry_with_release(focus, issues, manager, log, releases, rest):
"""
Releases 'eat' the entries in their line's list and get added to the
final data structure. They also inform new release-line 'buffers'.
Release lines, once the release obj is removed, should be empty or a
comma-separa... | (focus, issues, manager, log, releases, rest) | [
0.044261589646339417,
0.056500162929296494,
-0.12441298365592957,
0.01672479882836342,
-0.03545807674527168,
-0.08356767892837524,
-0.01612413302063942,
0.03603997081518173,
-0.00905222725123167,
-0.0261289793998003,
-0.025171667337417603,
0.009995460510253906,
-0.012369968928396702,
-0.00... |
5,350 | releases | construct_entry_without_release | null | def construct_entry_without_release(focus, issues, manager, log, rest):
# Handle rare-but-valid non-issue-attached line items, which are
# always bugs. (They are their own description.)
if not isinstance(focus, Issue):
# First, sanity check for potential mistakes resulting in an issue node
#... | (focus, issues, manager, log, rest) | [
0.01696445234119892,
0.05244714394211769,
-0.054300785064697266,
0.009331812150776386,
-0.06531359255313873,
-0.07625371217727661,
0.006855746731162071,
0.044051241129636765,
0.02386108785867691,
-0.02089889720082283,
-0.003550540888682008,
0.03690926730632782,
-0.021625814959406853,
-0.00... |
5,351 | releases | construct_nodes | null | def construct_nodes(releases):
result = []
# Reverse the list again so the final display is newest on top
for d in reversed(releases):
if not d["entries"]:
continue
obj = d["obj"]
entries = []
for entry in d["entries"]:
# Use nodes.Node.deepcopy to dee... | (releases) | [
-0.01645575277507305,
0.02226089872419834,
-0.057392850518226624,
-0.07282306253910065,
-0.020661426708102226,
0.04629062861204147,
0.026099633425474167,
0.013604927808046341,
0.028056636452674866,
0.02020980976521969,
0.009286351501941681,
0.03959165886044502,
0.015571339055895805,
-0.021... |
5,352 | releases | construct_releases | null | def construct_releases(entries, app):
log = partial(_log, config=app.config)
# Walk from back to front, consuming entries & copying them into
# per-release buckets as releases are encountered. Store releases in order.
releases = []
# Release lines, to be organized by major releases, then by major+mi... | (entries, app) | [
0.018623067066073418,
0.04391283169388771,
-0.14799688756465912,
-0.013865211047232151,
-0.03430215269327164,
-0.046495940536260605,
-0.0050190165638923645,
0.011766435578465462,
-0.007450176868587732,
-0.010949717834591866,
-0.008618272840976715,
0.047293663024902344,
0.027825389057397842,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.