partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
train
XrefDialog.get_xrefs_list
Static method called before creating a XrefDialog to check if there are xrefs to display method (optional): method of the class we are looking xref from
androguard/gui/xrefwindow.py
def get_xrefs_list(cls, class_item, method=None): """Static method called before creating a XrefDialog to check if there are xrefs to display method (optional): method of the class we are looking xref from """ log.debug("Getting XREF for %s" % class_item) item = c...
def get_xrefs_list(cls, class_item, method=None): """Static method called before creating a XrefDialog to check if there are xrefs to display method (optional): method of the class we are looking xref from """ log.debug("Getting XREF for %s" % class_item) item = c...
[ "Static", "method", "called", "before", "creating", "a", "XrefDialog", "to", "check", "if", "there", "are", "xrefs", "to", "display", "method", "(", "optional", ")", ":", "method", "of", "the", "class", "we", "are", "looking", "xref", "from" ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/gui/xrefwindow.py#L218-L229
[ "def", "get_xrefs_list", "(", "cls", ",", "class_item", ",", "method", "=", "None", ")", ":", "log", ".", "debug", "(", "\"Getting XREF for %s\"", "%", "class_item", ")", "item", "=", "class_item", "if", "method", ":", "item", "=", "method", "return", "Xre...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
XrefDialog.get_xrefs_list_from_element
Helper for get_xrefs_list element is a ClassDefItem or MethodDefItem At the end of the function, we lost if we worked on a class or method but we do not care for now.
androguard/gui/xrefwindow.py
def get_xrefs_list_from_element(cls, element): """Helper for get_xrefs_list element is a ClassDefItem or MethodDefItem At the end of the function, we lost if we worked on a class or method but we do not care for now. """ xref_items = element.XREFfrom.items ...
def get_xrefs_list_from_element(cls, element): """Helper for get_xrefs_list element is a ClassDefItem or MethodDefItem At the end of the function, we lost if we worked on a class or method but we do not care for now. """ xref_items = element.XREFfrom.items ...
[ "Helper", "for", "get_xrefs_list" ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/gui/xrefwindow.py#L232-L249
[ "def", "get_xrefs_list_from_element", "(", "cls", ",", "element", ")", ":", "xref_items", "=", "element", ".", "XREFfrom", ".", "items", "log", ".", "debug", "(", "\"%d XREFs found\"", "%", "len", "(", "xref_items", ")", ")", "xrefs", "=", "[", "]", "for",...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
plot
Plot the call graph using matplotlib For larger graphs, this should not be used, as it is very slow and probably you can not see anything on it. :param cg: A networkx call graph to plot
androguard/cli/main.py
def plot(cg): """ Plot the call graph using matplotlib For larger graphs, this should not be used, as it is very slow and probably you can not see anything on it. :param cg: A networkx call graph to plot """ from androguard.core.analysis.analysis import ExternalMethod import matplotlib....
def plot(cg): """ Plot the call graph using matplotlib For larger graphs, this should not be used, as it is very slow and probably you can not see anything on it. :param cg: A networkx call graph to plot """ from androguard.core.analysis.analysis import ExternalMethod import matplotlib....
[ "Plot", "the", "call", "graph", "using", "matplotlib", "For", "larger", "graphs", "this", "should", "not", "be", "used", "as", "it", "is", "very", "slow", "and", "probably", "you", "can", "not", "see", "anything", "on", "it", "." ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/cli/main.py#L133-L163
[ "def", "plot", "(", "cg", ")", ":", "from", "androguard", ".", "core", ".", "analysis", ".", "analysis", "import", "ExternalMethod", "import", "matplotlib", ".", "pyplot", "as", "plt", "import", "networkx", "as", "nx", "pos", "=", "nx", ".", "spring_layout...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
_write_gml
Wrapper around nx.write_gml
androguard/cli/main.py
def _write_gml(G, path): """ Wrapper around nx.write_gml """ import networkx as nx return nx.write_gml(G, path, stringizer=str)
def _write_gml(G, path): """ Wrapper around nx.write_gml """ import networkx as nx return nx.write_gml(G, path, stringizer=str)
[ "Wrapper", "around", "nx", ".", "write_gml" ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/cli/main.py#L166-L171
[ "def", "_write_gml", "(", "G", ",", "path", ")", ":", "import", "networkx", "as", "nx", "return", "nx", ".", "write_gml", "(", "G", ",", "path", ",", "stringizer", "=", "str", ")" ]
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
androlyze_main
Start an interactive shell :param session: Session file to load :param filename: File to analyze, can be APK or DEX (or ODEX)
androguard/cli/main.py
def androlyze_main(session, filename): """ Start an interactive shell :param session: Session file to load :param filename: File to analyze, can be APK or DEX (or ODEX) """ from androguard.core.androconf import ANDROGUARD_VERSION, CONF from IPython.terminal.embed import InteractiveShellEmbe...
def androlyze_main(session, filename): """ Start an interactive shell :param session: Session file to load :param filename: File to analyze, can be APK or DEX (or ODEX) """ from androguard.core.androconf import ANDROGUARD_VERSION, CONF from IPython.terminal.embed import InteractiveShellEmbe...
[ "Start", "an", "interactive", "shell" ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/cli/main.py#L322-L419
[ "def", "androlyze_main", "(", "session", ",", "filename", ")", ":", "from", "androguard", ".", "core", ".", "androconf", "import", "ANDROGUARD_VERSION", ",", "CONF", "from", "IPython", ".", "terminal", ".", "embed", "import", "InteractiveShellEmbed", "from", "tr...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
decode
Decode bytes as MUTF-8 See https://docs.oracle.com/javase/6/docs/api/java/io/DataInput.html#modified-utf-8 for more information Surrogates will be returned as two 16 bit characters. :param b: bytes to decode :rtype: unicode (py2), str (py3) of 16bit chars :raises: UnicodeDecodeError if string ...
androguard/core/bytecodes/mutf8.py
def decode(b): """ Decode bytes as MUTF-8 See https://docs.oracle.com/javase/6/docs/api/java/io/DataInput.html#modified-utf-8 for more information Surrogates will be returned as two 16 bit characters. :param b: bytes to decode :rtype: unicode (py2), str (py3) of 16bit chars :raises: Un...
def decode(b): """ Decode bytes as MUTF-8 See https://docs.oracle.com/javase/6/docs/api/java/io/DataInput.html#modified-utf-8 for more information Surrogates will be returned as two 16 bit characters. :param b: bytes to decode :rtype: unicode (py2), str (py3) of 16bit chars :raises: Un...
[ "Decode", "bytes", "as", "MUTF", "-", "8", "See", "https", ":", "//", "docs", ".", "oracle", ".", "com", "/", "javase", "/", "6", "/", "docs", "/", "api", "/", "java", "/", "io", "/", "DataInput", ".", "html#modified", "-", "utf", "-", "8", "for"...
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/mutf8.py#L1-L41
[ "def", "decode", "(", "b", ")", ":", "res", "=", "\"\"", "b", "=", "iter", "(", "bytearray", "(", "b", ")", ")", "for", "x", "in", "b", ":", "if", "x", ">>", "7", "==", "0", ":", "# Single char:", "res", "+=", "chr", "(", "x", "&", "0x7f", ...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
patch_string
Reorganize a String in such a way that surrogates are printable and lonely surrogates are escaped. :param s: input string :return: string with escaped lonely surrogates and 32bit surrogates
androguard/core/bytecodes/mutf8.py
def patch_string(s): """ Reorganize a String in such a way that surrogates are printable and lonely surrogates are escaped. :param s: input string :return: string with escaped lonely surrogates and 32bit surrogates """ res = '' it = PeekIterator(s) for c in it: if (ord(c) >>...
def patch_string(s): """ Reorganize a String in such a way that surrogates are printable and lonely surrogates are escaped. :param s: input string :return: string with escaped lonely surrogates and 32bit surrogates """ res = '' it = PeekIterator(s) for c in it: if (ord(c) >>...
[ "Reorganize", "a", "String", "in", "such", "a", "way", "that", "surrogates", "are", "printable", "and", "lonely", "surrogates", "are", "escaped", "." ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/mutf8.py#L73-L102
[ "def", "patch_string", "(", "s", ")", ":", "res", "=", "''", "it", "=", "PeekIterator", "(", "s", ")", "for", "c", "in", "it", ":", "if", "(", "ord", "(", "c", ")", ">>", "10", ")", "==", "0b110110", ":", "# High surrogate", "# Check for the next", ...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
string
Convert a string to a escaped ASCII representation including quotation marks :param s: a string :return: ASCII escaped string
androguard/decompiler/dad/writer.py
def string(s): """ Convert a string to a escaped ASCII representation including quotation marks :param s: a string :return: ASCII escaped string """ ret = ['"'] for c in s: if ' ' <= c < '\x7f': if c == "'" or c == '"' or c == '\\': ret.append('\\') ...
def string(s): """ Convert a string to a escaped ASCII representation including quotation marks :param s: a string :return: ASCII escaped string """ ret = ['"'] for c in s: if ' ' <= c < '\x7f': if c == "'" or c == '"' or c == '\\': ret.append('\\') ...
[ "Convert", "a", "string", "to", "a", "escaped", "ASCII", "representation", "including", "quotation", "marks", ":", "param", "s", ":", "a", "string", ":", "return", ":", "ASCII", "escaped", "string" ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/decompiler/dad/writer.py#L696-L721
[ "def", "string", "(", "s", ")", ":", "ret", "=", "[", "'\"'", "]", "for", "c", "in", "s", ":", "if", "' '", "<=", "c", "<", "'\\x7f'", ":", "if", "c", "==", "\"'\"", "or", "c", "==", "'\"'", "or", "c", "==", "'\\\\'", ":", "ret", ".", "appe...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
MyHighlighter.highlightBlock
Highlight a block of text.
androguard/gui/sourcewindow.py
def highlightBlock(self, string): """ Highlight a block of text. """ prev_data = self.currentBlock().previous().userData() if prev_data is not None: self._lexer._saved_state_stack = prev_data.syntax_stack elif hasattr(self._lexer, '_saved_state_stack'): de...
def highlightBlock(self, string): """ Highlight a block of text. """ prev_data = self.currentBlock().previous().userData() if prev_data is not None: self._lexer._saved_state_stack = prev_data.syntax_stack elif hasattr(self._lexer, '_saved_state_stack'): de...
[ "Highlight", "a", "block", "of", "text", "." ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/gui/sourcewindow.py#L174-L195
[ "def", "highlightBlock", "(", "self", ",", "string", ")", ":", "prev_data", "=", "self", ".", "currentBlock", "(", ")", ".", "previous", "(", ")", ".", "userData", "(", ")", "if", "prev_data", "is", "not", "None", ":", "self", ".", "_lexer", ".", "_s...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
MyHighlighter.set_style
Sets the style to the specified Pygments style.
androguard/gui/sourcewindow.py
def set_style(self, style): """ Sets the style to the specified Pygments style. """ style = SolarizedStyle # get_style_by_name(style) self._style = style self._clear_caches()
def set_style(self, style): """ Sets the style to the specified Pygments style. """ style = SolarizedStyle # get_style_by_name(style) self._style = style self._clear_caches()
[ "Sets", "the", "style", "to", "the", "specified", "Pygments", "style", "." ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/gui/sourcewindow.py#L201-L206
[ "def", "set_style", "(", "self", ",", "style", ")", ":", "style", "=", "SolarizedStyle", "# get_style_by_name(style)", "self", ".", "_style", "=", "style", "self", ".", "_clear_caches", "(", ")" ]
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
MyHighlighter.set_style_sheet
Sets a CSS stylesheet. The classes in the stylesheet should correspond to those generated by: pygmentize -S <style> -f html Note that 'set_style' and 'set_style_sheet' completely override each other, i.e. they cannot be used in conjunction.
androguard/gui/sourcewindow.py
def set_style_sheet(self, stylesheet): """ Sets a CSS stylesheet. The classes in the stylesheet should correspond to those generated by: pygmentize -S <style> -f html Note that 'set_style' and 'set_style_sheet' completely override each other, i.e. they cannot be used in conju...
def set_style_sheet(self, stylesheet): """ Sets a CSS stylesheet. The classes in the stylesheet should correspond to those generated by: pygmentize -S <style> -f html Note that 'set_style' and 'set_style_sheet' completely override each other, i.e. they cannot be used in conju...
[ "Sets", "a", "CSS", "stylesheet", ".", "The", "classes", "in", "the", "stylesheet", "should", "correspond", "to", "those", "generated", "by", ":", "pygmentize", "-", "S", "<style", ">", "-", "f", "html", "Note", "that", "set_style", "and", "set_style_sheet",...
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/gui/sourcewindow.py#L208-L217
[ "def", "set_style_sheet", "(", "self", ",", "stylesheet", ")", ":", "self", ".", "_document", ".", "setDefaultStyleSheet", "(", "stylesheet", ")", "self", ".", "_style", "=", "None", "self", ".", "_clear_caches", "(", ")" ]
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
MyHighlighter._get_format
Returns a QTextCharFormat for token or None.
androguard/gui/sourcewindow.py
def _get_format(self, token): """ Returns a QTextCharFormat for token or None. """ if token in self._formats: return self._formats[token] result = self._get_format_from_style(token, self._style) self._formats[token] = result return result
def _get_format(self, token): """ Returns a QTextCharFormat for token or None. """ if token in self._formats: return self._formats[token] result = self._get_format_from_style(token, self._style) self._formats[token] = result return result
[ "Returns", "a", "QTextCharFormat", "for", "token", "or", "None", "." ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/gui/sourcewindow.py#L229-L238
[ "def", "_get_format", "(", "self", ",", "token", ")", ":", "if", "token", "in", "self", ".", "_formats", ":", "return", "self", ".", "_formats", "[", "token", "]", "result", "=", "self", ".", "_get_format_from_style", "(", "token", ",", "self", ".", "_...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
MyHighlighter._get_brush
Returns a brush for the color.
androguard/gui/sourcewindow.py
def _get_brush(self, color): """ Returns a brush for the color. """ result = self._brushes.get(color) if result is None: qcolor = self._get_color(color) result = QtGui.QBrush(qcolor) self._brushes[color] = result return result
def _get_brush(self, color): """ Returns a brush for the color. """ result = self._brushes.get(color) if result is None: qcolor = self._get_color(color) result = QtGui.QBrush(qcolor) self._brushes[color] = result return result
[ "Returns", "a", "brush", "for", "the", "color", "." ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/gui/sourcewindow.py#L265-L273
[ "def", "_get_brush", "(", "self", ",", "color", ")", ":", "result", "=", "self", ".", "_brushes", ".", "get", "(", "color", ")", "if", "result", "is", "None", ":", "qcolor", "=", "self", ".", "_get_color", "(", "color", ")", "result", "=", "QtGui", ...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
MyHighlighter._get_color
Returns a QColor built from a Pygments color string.
androguard/gui/sourcewindow.py
def _get_color(self, color): """ Returns a QColor built from a Pygments color string. """ qcolor = QtGui.QColor() qcolor.setRgb(int(color[:2], base=16), int(color[2:4], base=16), int(color[4:6], base=16)) return qcolor
def _get_color(self, color): """ Returns a QColor built from a Pygments color string. """ qcolor = QtGui.QColor() qcolor.setRgb(int(color[:2], base=16), int(color[2:4], base=16), int(color[4:6], base=16)) return qcolor
[ "Returns", "a", "QColor", "built", "from", "a", "Pygments", "color", "string", "." ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/gui/sourcewindow.py#L275-L282
[ "def", "_get_color", "(", "self", ",", "color", ")", ":", "qcolor", "=", "QtGui", ".", "QColor", "(", ")", "qcolor", ".", "setRgb", "(", "int", "(", "color", "[", ":", "2", "]", ",", "base", "=", "16", ")", ",", "int", "(", "color", "[", "2", ...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
SourceWindow.reload_java_sources
Reload completely the sources by asking Androguard to decompile it again. Useful when: - an element has been renamed to propagate the info - the current tab is changed because we do not know what user did since then, so we need to propagate previous changes as well
androguard/gui/sourcewindow.py
def reload_java_sources(self): """Reload completely the sources by asking Androguard to decompile it again. Useful when: - an element has been renamed to propagate the info - the current tab is changed because we do not know what user did since then, so we need t...
def reload_java_sources(self): """Reload completely the sources by asking Androguard to decompile it again. Useful when: - an element has been renamed to propagate the info - the current tab is changed because we do not know what user did since then, so we need t...
[ "Reload", "completely", "the", "sources", "by", "asking", "Androguard", "to", "decompile", "it", "again", ".", "Useful", "when", ":", "-", "an", "element", "has", "been", "renamed", "to", "propagate", "the", "info", "-", "the", "current", "tab", "is", "cha...
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/gui/sourcewindow.py#L337-L368
[ "def", "reload_java_sources", "(", "self", ")", ":", "log", ".", "debug", "(", "\"Getting sources for %s\"", "%", "self", ".", "current_class", ")", "lines", "=", "[", "(", "\"COMMENTS\"", ",", "[", "(", "\"COMMENT\"", ",", "\"// filename:{}\\n// digest:{}\\n\\n\"...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
SourceWindow.cursor_position_changed
Used to detect when cursor change position and to auto select word underneath it
androguard/gui/sourcewindow.py
def cursor_position_changed(self): """Used to detect when cursor change position and to auto select word underneath it""" log.debug("cursor_position_changed") cur = self.textCursor() log.debug(cur.position()) log.debug(cur.selectedText()) if len(cur.selectedTe...
def cursor_position_changed(self): """Used to detect when cursor change position and to auto select word underneath it""" log.debug("cursor_position_changed") cur = self.textCursor() log.debug(cur.position()) log.debug(cur.selectedText()) if len(cur.selectedTe...
[ "Used", "to", "detect", "when", "cursor", "change", "position", "and", "to", "auto", "select", "word", "underneath", "it" ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/gui/sourcewindow.py#L370-L380
[ "def", "cursor_position_changed", "(", "self", ")", ":", "log", ".", "debug", "(", "\"cursor_position_changed\"", ")", "cur", "=", "self", ".", "textCursor", "(", ")", "log", ".", "debug", "(", "cur", ".", "position", "(", ")", ")", "log", ".", "debug", ...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
SourceWindow.keyPressEvent
Keyboard shortcuts
androguard/gui/sourcewindow.py
def keyPressEvent(self, event): """Keyboard shortcuts""" key = event.key() if key == QtCore.Qt.Key_X: self.actionXref() elif key == QtCore.Qt.Key_G: self.actionGoto() elif key == QtCore.Qt.Key_X: self.actionXref() elif key == QtCore.Qt....
def keyPressEvent(self, event): """Keyboard shortcuts""" key = event.key() if key == QtCore.Qt.Key_X: self.actionXref() elif key == QtCore.Qt.Key_G: self.actionGoto() elif key == QtCore.Qt.Key_X: self.actionXref() elif key == QtCore.Qt....
[ "Keyboard", "shortcuts" ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/gui/sourcewindow.py#L383-L395
[ "def", "keyPressEvent", "(", "self", ",", "event", ")", ":", "key", "=", "event", ".", "key", "(", ")", "if", "key", "==", "QtCore", ".", "Qt", ".", "Key_X", ":", "self", ".", "actionXref", "(", ")", "elif", "key", "==", "QtCore", ".", "Qt", ".",...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
SourceWindow.method_name_exist
Check if there is already a meth_name method in the current class It is useful before allowing to rename a method to check name does not already exist.
androguard/gui/sourcewindow.py
def method_name_exist(self, meth_name): """Check if there is already a meth_name method in the current class It is useful before allowing to rename a method to check name does not already exist. """ methods = self.current_class.get_methods() for m in methods: ...
def method_name_exist(self, meth_name): """Check if there is already a meth_name method in the current class It is useful before allowing to rename a method to check name does not already exist. """ methods = self.current_class.get_methods() for m in methods: ...
[ "Check", "if", "there", "is", "already", "a", "meth_name", "method", "in", "the", "current", "class", "It", "is", "useful", "before", "allowing", "to", "rename", "a", "method", "to", "check", "name", "does", "not", "already", "exist", "." ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/gui/sourcewindow.py#L629-L639
[ "def", "method_name_exist", "(", "self", ",", "meth_name", ")", ":", "methods", "=", "self", ".", "current_class", ".", "get_methods", "(", ")", "for", "m", "in", "methods", ":", "if", "m", ".", "name", "==", "meth_name", ":", "return", "True", "return",...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
SourceWindow.field_name_exist
Check if there is already a field_name field in the current class It is useful before allowing to rename a field to check name does not already exist.
androguard/gui/sourcewindow.py
def field_name_exist(self, field_name): """Check if there is already a field_name field in the current class It is useful before allowing to rename a field to check name does not already exist. """ fields = self.class_item.get_fields() for f in fields: ...
def field_name_exist(self, field_name): """Check if there is already a field_name field in the current class It is useful before allowing to rename a field to check name does not already exist. """ fields = self.class_item.get_fields() for f in fields: ...
[ "Check", "if", "there", "is", "already", "a", "field_name", "field", "in", "the", "current", "class", "It", "is", "useful", "before", "allowing", "to", "rename", "a", "field", "to", "check", "name", "does", "not", "already", "exist", "." ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/gui/sourcewindow.py#L641-L651
[ "def", "field_name_exist", "(", "self", ",", "field_name", ")", ":", "fields", "=", "self", ".", "class_item", ".", "get_fields", "(", ")", "for", "f", "in", "fields", ":", "if", "f", ".", "name", "==", "field_name", ":", "return", "True", "return", "F...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
SourceWindow.renameElement
Called back after a user chose a new name for an element.
androguard/gui/sourcewindow.py
def renameElement(self, oldname, newname, info): """Called back after a user chose a new name for an element. """ log.debug("Renaming %s into %s in %s" % (oldname, newname, self.current_filename)) start, end = info try: t = self.doc.binding[st...
def renameElement(self, oldname, newname, info): """Called back after a user chose a new name for an element. """ log.debug("Renaming %s into %s in %s" % (oldname, newname, self.current_filename)) start, end = info try: t = self.doc.binding[st...
[ "Called", "back", "after", "a", "user", "chose", "a", "new", "name", "for", "an", "element", "." ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/gui/sourcewindow.py#L653-L732
[ "def", "renameElement", "(", "self", ",", "oldname", ",", "newname", ",", "info", ")", ":", "log", ".", "debug", "(", "\"Renaming %s into %s in %s\"", "%", "(", "oldname", ",", "newname", ",", "self", ".", "current_filename", ")", ")", "start", ",", "end",...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
format_value
Format a value based on type and data. By default, no strings are looked up and "<string>" is returned. You need to define `lookup_string` in order to actually lookup strings from the string table. :param _type: The numeric type of the value :param _data: The numeric data of the value :param lo...
androguard/core/bytecodes/axml/__init__.py
def format_value(_type, _data, lookup_string=lambda ix: "<string>"): """ Format a value based on type and data. By default, no strings are looked up and "<string>" is returned. You need to define `lookup_string` in order to actually lookup strings from the string table. :param _type: The numeri...
def format_value(_type, _data, lookup_string=lambda ix: "<string>"): """ Format a value based on type and data. By default, no strings are looked up and "<string>" is returned. You need to define `lookup_string` in order to actually lookup strings from the string table. :param _type: The numeri...
[ "Format", "a", "value", "based", "on", "type", "and", "data", ".", "By", "default", "no", "strings", "are", "looked", "up", "and", "<string", ">", "is", "returned", ".", "You", "need", "to", "define", "lookup_string", "in", "order", "to", "actually", "lo...
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L850-L901
[ "def", "format_value", "(", "_type", ",", "_data", ",", "lookup_string", "=", "lambda", "ix", ":", "\"<string>\"", ")", ":", "# Function to prepend android prefix for attributes/references from the", "# android library", "fmt_package", "=", "lambda", "x", ":", "\"android:...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
get_arsc_info
Return a string containing all resources packages ordered by packagename, locale and type. :param arscobj: :class:`~ARSCParser` :return: a string
androguard/core/bytecodes/axml/__init__.py
def get_arsc_info(arscobj): """ Return a string containing all resources packages ordered by packagename, locale and type. :param arscobj: :class:`~ARSCParser` :return: a string """ buff = "" for package in arscobj.get_packages_names(): buff += package + ":\n" for locale in ...
def get_arsc_info(arscobj): """ Return a string containing all resources packages ordered by packagename, locale and type. :param arscobj: :class:`~ARSCParser` :return: a string """ buff = "" for package in arscobj.get_packages_names(): buff += package + ":\n" for locale in ...
[ "Return", "a", "string", "containing", "all", "resources", "packages", "ordered", "by", "packagename", "locale", "and", "type", "." ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L2708-L2729
[ "def", "get_arsc_info", "(", "arscobj", ")", ":", "buff", "=", "\"\"", "for", "package", "in", "arscobj", ".", "get_packages_names", "(", ")", ":", "buff", "+=", "package", "+", "\":\\n\"", "for", "locale", "in", "arscobj", ".", "get_locales", "(", "packag...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
StringBlock.getString
Return the string at the index in the string table :param idx: index in the string table :return: str
androguard/core/bytecodes/axml/__init__.py
def getString(self, idx): """ Return the string at the index in the string table :param idx: index in the string table :return: str """ if idx in self._cache: return self._cache[idx] if idx < 0 or not self.m_stringOffsets or idx > self.stringCount: ...
def getString(self, idx): """ Return the string at the index in the string table :param idx: index in the string table :return: str """ if idx in self._cache: return self._cache[idx] if idx < 0 or not self.m_stringOffsets or idx > self.stringCount: ...
[ "Return", "the", "string", "at", "the", "index", "in", "the", "string", "table" ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L193-L213
[ "def", "getString", "(", "self", ",", "idx", ")", ":", "if", "idx", "in", "self", ".", "_cache", ":", "return", "self", ".", "_cache", "[", "idx", "]", "if", "idx", "<", "0", "or", "not", "self", ".", "m_stringOffsets", "or", "idx", ">", "self", ...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
StringBlock._decode_bytes
Generic decoding with length check. The string is decoded from bytes with the given encoding, then the length of the string is checked. The string is decoded using the "replace" method. :param data: bytes :param encoding: encoding name ("utf-8" or "utf-16") :param str_le...
androguard/core/bytecodes/axml/__init__.py
def _decode_bytes(data, encoding, str_len): """ Generic decoding with length check. The string is decoded from bytes with the given encoding, then the length of the string is checked. The string is decoded using the "replace" method. :param data: bytes :param enc...
def _decode_bytes(data, encoding, str_len): """ Generic decoding with length check. The string is decoded from bytes with the given encoding, then the length of the string is checked. The string is decoded using the "replace" method. :param data: bytes :param enc...
[ "Generic", "decoding", "with", "length", "check", ".", "The", "string", "is", "decoded", "from", "bytes", "with", "the", "given", "encoding", "then", "the", "length", "of", "the", "string", "is", "checked", ".", "The", "string", "is", "decoded", "using", "...
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L268-L283
[ "def", "_decode_bytes", "(", "data", ",", "encoding", ",", "str_len", ")", ":", "string", "=", "data", ".", "decode", "(", "encoding", ",", "'replace'", ")", "if", "len", "(", "string", ")", "!=", "str_len", ":", "log", ".", "warning", "(", "\"invalid ...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
StringBlock.show
Print some information on stdout about the string table
androguard/core/bytecodes/axml/__init__.py
def show(self): """ Print some information on stdout about the string table """ print("StringBlock(stringsCount=0x%x, " "stringsOffset=0x%x, " "stylesCount=0x%x, " "stylesOffset=0x%x, " "flags=0x%x" ")" % (self.stringC...
def show(self): """ Print some information on stdout about the string table """ print("StringBlock(stringsCount=0x%x, " "stringsOffset=0x%x, " "stylesCount=0x%x, " "stylesOffset=0x%x, " "flags=0x%x" ")" % (self.stringC...
[ "Print", "some", "information", "on", "stdout", "about", "the", "string", "table" ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L322-L347
[ "def", "show", "(", "self", ")", ":", "print", "(", "\"StringBlock(stringsCount=0x%x, \"", "\"stringsOffset=0x%x, \"", "\"stylesCount=0x%x, \"", "\"stylesOffset=0x%x, \"", "\"flags=0x%x\"", "\")\"", "%", "(", "self", ".", "stringCount", ",", "self", ".", "stringsOffset", ...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
AXMLParser.name
Return the String assosciated with the tag name
androguard/core/bytecodes/axml/__init__.py
def name(self): """ Return the String assosciated with the tag name """ if self.m_name == -1 or (self.m_event != START_TAG and self.m_event != END_TAG): return '' return self.sb[self.m_name]
def name(self): """ Return the String assosciated with the tag name """ if self.m_name == -1 or (self.m_event != START_TAG and self.m_event != END_TAG): return '' return self.sb[self.m_name]
[ "Return", "the", "String", "assosciated", "with", "the", "tag", "name" ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L658-L665
[ "def", "name", "(", "self", ")", ":", "if", "self", ".", "m_name", "==", "-", "1", "or", "(", "self", ".", "m_event", "!=", "START_TAG", "and", "self", ".", "m_event", "!=", "END_TAG", ")", ":", "return", "''", "return", "self", ".", "sb", "[", "...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
AXMLParser.nsmap
Returns the current namespace mapping as a dictionary there are several problems with the map and we try to guess a few things here: 1) a URI can be mapped by many prefixes, so it is to decide which one to take 2) a prefix might map to an empty string (some packers) 3) uri+pref...
androguard/core/bytecodes/axml/__init__.py
def nsmap(self): """ Returns the current namespace mapping as a dictionary there are several problems with the map and we try to guess a few things here: 1) a URI can be mapped by many prefixes, so it is to decide which one to take 2) a prefix might map to an empty stri...
def nsmap(self): """ Returns the current namespace mapping as a dictionary there are several problems with the map and we try to guess a few things here: 1) a URI can be mapped by many prefixes, so it is to decide which one to take 2) a prefix might map to an empty stri...
[ "Returns", "the", "current", "namespace", "mapping", "as", "a", "dictionary" ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L695-L718
[ "def", "nsmap", "(", "self", ")", ":", "NSMAP", "=", "dict", "(", ")", "# solve 3) by using a set", "for", "k", ",", "v", "in", "set", "(", "self", ".", "namespaces", ")", ":", "s_prefix", "=", "self", ".", "sb", "[", "k", "]", "s_uri", "=", "self"...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
AXMLParser.text
Return the String assosicated with the current text
androguard/core/bytecodes/axml/__init__.py
def text(self): """ Return the String assosicated with the current text """ if self.m_name == -1 or self.m_event != TEXT: return '' return self.sb[self.m_name]
def text(self): """ Return the String assosicated with the current text """ if self.m_name == -1 or self.m_event != TEXT: return '' return self.sb[self.m_name]
[ "Return", "the", "String", "assosicated", "with", "the", "current", "text" ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L721-L728
[ "def", "text", "(", "self", ")", ":", "if", "self", ".", "m_name", "==", "-", "1", "or", "self", ".", "m_event", "!=", "TEXT", ":", "return", "''", "return", "self", ".", "sb", "[", "self", ".", "m_name", "]" ]
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
AXMLParser._get_attribute_offset
Return the start inside the m_attributes array for a given attribute
androguard/core/bytecodes/axml/__init__.py
def _get_attribute_offset(self, index): """ Return the start inside the m_attributes array for a given attribute """ if self.m_event != START_TAG: log.warning("Current event is not START_TAG.") offset = index * ATTRIBUTE_LENGHT if offset >= len(self.m_attribu...
def _get_attribute_offset(self, index): """ Return the start inside the m_attributes array for a given attribute """ if self.m_event != START_TAG: log.warning("Current event is not START_TAG.") offset = index * ATTRIBUTE_LENGHT if offset >= len(self.m_attribu...
[ "Return", "the", "start", "inside", "the", "m_attributes", "array", "for", "a", "given", "attribute" ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L751-L762
[ "def", "_get_attribute_offset", "(", "self", ",", "index", ")", ":", "if", "self", ".", "m_event", "!=", "START_TAG", ":", "log", ".", "warning", "(", "\"Current event is not START_TAG.\"", ")", "offset", "=", "index", "*", "ATTRIBUTE_LENGHT", "if", "offset", ...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
AXMLParser.getAttributeUri
Returns the numeric ID for the namespace URI of an attribute
androguard/core/bytecodes/axml/__init__.py
def getAttributeUri(self, index): """ Returns the numeric ID for the namespace URI of an attribute """ offset = self._get_attribute_offset(index) uri = self.m_attributes[offset + ATTRIBUTE_IX_NAMESPACE_URI] return uri
def getAttributeUri(self, index): """ Returns the numeric ID for the namespace URI of an attribute """ offset = self._get_attribute_offset(index) uri = self.m_attributes[offset + ATTRIBUTE_IX_NAMESPACE_URI] return uri
[ "Returns", "the", "numeric", "ID", "for", "the", "namespace", "URI", "of", "an", "attribute" ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L774-L781
[ "def", "getAttributeUri", "(", "self", ",", "index", ")", ":", "offset", "=", "self", ".", "_get_attribute_offset", "(", "index", ")", "uri", "=", "self", ".", "m_attributes", "[", "offset", "+", "ATTRIBUTE_IX_NAMESPACE_URI", "]", "return", "uri" ]
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
AXMLParser.getAttributeValue
This function is only used to look up strings All other work is done by :func:`~androguard.core.bytecodes.axml.format_value` # FIXME should unite those functions :param index: index of the attribute :return:
androguard/core/bytecodes/axml/__init__.py
def getAttributeValue(self, index): """ This function is only used to look up strings All other work is done by :func:`~androguard.core.bytecodes.axml.format_value` # FIXME should unite those functions :param index: index of the attribute :return: """ ...
def getAttributeValue(self, index): """ This function is only used to look up strings All other work is done by :func:`~androguard.core.bytecodes.axml.format_value` # FIXME should unite those functions :param index: index of the attribute :return: """ ...
[ "This", "function", "is", "only", "used", "to", "look", "up", "strings", "All", "other", "work", "is", "done", "by", ":", "func", ":", "~androguard", ".", "core", ".", "bytecodes", ".", "axml", ".", "format_value", "#", "FIXME", "should", "unite", "those...
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L833-L847
[ "def", "getAttributeValue", "(", "self", ",", "index", ")", ":", "offset", "=", "self", ".", "_get_attribute_offset", "(", "index", ")", "valueType", "=", "self", ".", "m_attributes", "[", "offset", "+", "ATTRIBUTE_IX_VALUE_TYPE", "]", "if", "valueType", "==",...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
AXMLPrinter.get_xml
Get the XML as an UTF-8 string :returns: bytes encoded as UTF-8
androguard/core/bytecodes/axml/__init__.py
def get_xml(self, pretty=True): """ Get the XML as an UTF-8 string :returns: bytes encoded as UTF-8 """ return etree.tostring(self.root, encoding="utf-8", pretty_print=pretty)
def get_xml(self, pretty=True): """ Get the XML as an UTF-8 string :returns: bytes encoded as UTF-8 """ return etree.tostring(self.root, encoding="utf-8", pretty_print=pretty)
[ "Get", "the", "XML", "as", "an", "UTF", "-", "8", "string" ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L986-L992
[ "def", "get_xml", "(", "self", ",", "pretty", "=", "True", ")", ":", "return", "etree", ".", "tostring", "(", "self", ".", "root", ",", "encoding", "=", "\"utf-8\"", ",", "pretty_print", "=", "pretty", ")" ]
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
AXMLPrinter._fix_name
Apply some fixes to element named and attribute names. Try to get conform to: > Like element names, attribute names are case-sensitive and must start with a letter or underscore. > The rest of the name can contain letters, digits, hyphens, underscores, and periods. See: https://msdn.micr...
androguard/core/bytecodes/axml/__init__.py
def _fix_name(self, prefix, name): """ Apply some fixes to element named and attribute names. Try to get conform to: > Like element names, attribute names are case-sensitive and must start with a letter or underscore. > The rest of the name can contain letters, digits, hyphens, u...
def _fix_name(self, prefix, name): """ Apply some fixes to element named and attribute names. Try to get conform to: > Like element names, attribute names are case-sensitive and must start with a letter or underscore. > The rest of the name can contain letters, digits, hyphens, u...
[ "Apply", "some", "fixes", "to", "element", "named", "and", "attribute", "names", ".", "Try", "to", "get", "conform", "to", ":", ">", "Like", "element", "names", "attribute", "names", "are", "case", "-", "sensitive", "and", "must", "start", "with", "a", "...
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L1034-L1085
[ "def", "_fix_name", "(", "self", ",", "prefix", ",", "name", ")", ":", "if", "not", "name", "[", "0", "]", ".", "isalpha", "(", ")", "and", "name", "[", "0", "]", "!=", "\"_\"", ":", "log", ".", "warning", "(", "\"Invalid start for name '{}'. \"", "\...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
AXMLPrinter._fix_value
Return a cleaned version of a value according to the specification: > Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] See https://www.w3.org/TR/xml/#charsets :param value: a value to clean :return: the cleaned value
androguard/core/bytecodes/axml/__init__.py
def _fix_value(self, value): """ Return a cleaned version of a value according to the specification: > Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] See https://www.w3.org/TR/xml/#charsets :param value: a value to clean :r...
def _fix_value(self, value): """ Return a cleaned version of a value according to the specification: > Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] See https://www.w3.org/TR/xml/#charsets :param value: a value to clean :r...
[ "Return", "a", "cleaned", "version", "of", "a", "value", "according", "to", "the", "specification", ":", ">", "Char", "::", "=", "#x9", "|", "#xA", "|", "#xD", "|", "[", "#x20", "-", "#xD7FF", "]", "|", "[", "#xE000", "-", "#xFFFD", "]", "|", "[", ...
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L1087-L1115
[ "def", "_fix_value", "(", "self", ",", "value", ")", ":", "if", "not", "self", ".", "__charrange", "or", "not", "self", ".", "__replacement", ":", "self", ".", "__charrange", "=", "re", ".", "compile", "(", "'^[\\u0020-\\uD7FF\\u0009\\u000A\\u000D\\uE000-\\uFFFD...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
ARSCParser.get_locales
Retrieve a list of all available locales in a given packagename. :param package_name: the package name to get locales of
androguard/core/bytecodes/axml/__init__.py
def get_locales(self, package_name): """ Retrieve a list of all available locales in a given packagename. :param package_name: the package name to get locales of """ self._analyse() return list(self.values[package_name].keys())
def get_locales(self, package_name): """ Retrieve a list of all available locales in a given packagename. :param package_name: the package name to get locales of """ self._analyse() return list(self.values[package_name].keys())
[ "Retrieve", "a", "list", "of", "all", "available", "locales", "in", "a", "given", "packagename", "." ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L1494-L1501
[ "def", "get_locales", "(", "self", ",", "package_name", ")", ":", "self", ".", "_analyse", "(", ")", "return", "list", "(", "self", ".", "values", "[", "package_name", "]", ".", "keys", "(", ")", ")" ]
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
ARSCParser.get_string_resources
Get the XML (as string) of all resources of type 'string'. Read more about string resources: https://developer.android.com/guide/topics/resources/string-resource.html :param package_name: the package name to get the resources for :param locale: the locale to get the resources for (defa...
androguard/core/bytecodes/axml/__init__.py
def get_string_resources(self, package_name, locale='\x00\x00'): """ Get the XML (as string) of all resources of type 'string'. Read more about string resources: https://developer.android.com/guide/topics/resources/string-resource.html :param package_name: the package name to g...
def get_string_resources(self, package_name, locale='\x00\x00'): """ Get the XML (as string) of all resources of type 'string'. Read more about string resources: https://developer.android.com/guide/topics/resources/string-resource.html :param package_name: the package name to g...
[ "Get", "the", "XML", "(", "as", "string", ")", "of", "all", "resources", "of", "type", "string", "." ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L1540-L1567
[ "def", "get_string_resources", "(", "self", ",", "package_name", ",", "locale", "=", "'\\x00\\x00'", ")", ":", "self", ".", "_analyse", "(", ")", "buff", "=", "'<?xml version=\"1.0\" encoding=\"utf-8\"?>\\n'", "buff", "+=", "'<resources>\\n'", "try", ":", "for", "...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
ARSCParser.get_strings_resources
Get the XML (as string) of all resources of type 'string'. This is a combined variant, which has all locales and all package names stored.
androguard/core/bytecodes/axml/__init__.py
def get_strings_resources(self): """ Get the XML (as string) of all resources of type 'string'. This is a combined variant, which has all locales and all package names stored. """ self._analyse() buff = '<?xml version="1.0" encoding="utf-8"?>\n' buff += ...
def get_strings_resources(self): """ Get the XML (as string) of all resources of type 'string'. This is a combined variant, which has all locales and all package names stored. """ self._analyse() buff = '<?xml version="1.0" encoding="utf-8"?>\n' buff += ...
[ "Get", "the", "XML", "(", "as", "string", ")", "of", "all", "resources", "of", "type", "string", ".", "This", "is", "a", "combined", "variant", "which", "has", "all", "locales", "and", "all", "package", "names", "stored", "." ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L1569-L1600
[ "def", "get_strings_resources", "(", "self", ")", ":", "self", ".", "_analyse", "(", ")", "buff", "=", "'<?xml version=\"1.0\" encoding=\"utf-8\"?>\\n'", "buff", "+=", "\"<packages>\\n\"", "for", "package_name", "in", "self", ".", "get_packages_names", "(", ")", ":"...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
ARSCParser.get_id_resources
Get the XML (as string) of all resources of type 'id'. Read more about ID resources: https://developer.android.com/guide/topics/resources/more-resources.html#Id :param package_name: the package name to get the resources for :param locale: the locale to get the resources for (default: '...
androguard/core/bytecodes/axml/__init__.py
def get_id_resources(self, package_name, locale='\x00\x00'): """ Get the XML (as string) of all resources of type 'id'. Read more about ID resources: https://developer.android.com/guide/topics/resources/more-resources.html#Id :param package_name: the package name to get the res...
def get_id_resources(self, package_name, locale='\x00\x00'): """ Get the XML (as string) of all resources of type 'id'. Read more about ID resources: https://developer.android.com/guide/topics/resources/more-resources.html#Id :param package_name: the package name to get the res...
[ "Get", "the", "XML", "(", "as", "string", ")", "of", "all", "resources", "of", "type", "id", "." ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L1602-L1629
[ "def", "get_id_resources", "(", "self", ",", "package_name", ",", "locale", "=", "'\\x00\\x00'", ")", ":", "self", ".", "_analyse", "(", ")", "buff", "=", "'<?xml version=\"1.0\" encoding=\"utf-8\"?>\\n'", "buff", "+=", "'<resources>\\n'", "try", ":", "for", "i", ...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
ARSCParser.get_bool_resources
Get the XML (as string) of all resources of type 'bool'. Read more about bool resources: https://developer.android.com/guide/topics/resources/more-resources.html#Bool :param package_name: the package name to get the resources for :param locale: the locale to get the resources for (defa...
androguard/core/bytecodes/axml/__init__.py
def get_bool_resources(self, package_name, locale='\x00\x00'): """ Get the XML (as string) of all resources of type 'bool'. Read more about bool resources: https://developer.android.com/guide/topics/resources/more-resources.html#Bool :param package_name: the package name to get...
def get_bool_resources(self, package_name, locale='\x00\x00'): """ Get the XML (as string) of all resources of type 'bool'. Read more about bool resources: https://developer.android.com/guide/topics/resources/more-resources.html#Bool :param package_name: the package name to get...
[ "Get", "the", "XML", "(", "as", "string", ")", "of", "all", "resources", "of", "type", "bool", "." ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L1631-L1654
[ "def", "get_bool_resources", "(", "self", ",", "package_name", ",", "locale", "=", "'\\x00\\x00'", ")", ":", "self", ".", "_analyse", "(", ")", "buff", "=", "'<?xml version=\"1.0\" encoding=\"utf-8\"?>\\n'", "buff", "+=", "'<resources>\\n'", "try", ":", "for", "i"...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
ARSCParser.get_resolved_res_configs
Return a list of resolved resource IDs with their corresponding configuration. It has a similar return type as :meth:`get_res_configs` but also handles complex entries and references. Also instead of returning :class:`ARSCResTableEntry` in the tuple, the actual values are resolved. This...
androguard/core/bytecodes/axml/__init__.py
def get_resolved_res_configs(self, rid, config=None): """ Return a list of resolved resource IDs with their corresponding configuration. It has a similar return type as :meth:`get_res_configs` but also handles complex entries and references. Also instead of returning :class:`ARSC...
def get_resolved_res_configs(self, rid, config=None): """ Return a list of resolved resource IDs with their corresponding configuration. It has a similar return type as :meth:`get_res_configs` but also handles complex entries and references. Also instead of returning :class:`ARSC...
[ "Return", "a", "list", "of", "resolved", "resource", "IDs", "with", "their", "corresponding", "configuration", ".", "It", "has", "a", "similar", "return", "type", "as", ":", "meth", ":", "get_res_configs", "but", "also", "handles", "complex", "entries", "and",...
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L1826-L1840
[ "def", "get_resolved_res_configs", "(", "self", ",", "rid", ",", "config", "=", "None", ")", ":", "resolver", "=", "ARSCParser", ".", "ResourceResolver", "(", "self", ",", "config", ")", "return", "resolver", ".", "resolve", "(", "rid", ")" ]
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
ARSCParser.get_res_configs
Return the resources found with the ID `rid` and select the right one based on the configuration, or return all if no configuration was set. But we try to be generous here and at least try to resolve something: This method uses a fallback to return at least one resource (the first one in the li...
androguard/core/bytecodes/axml/__init__.py
def get_res_configs(self, rid, config=None, fallback=True): """ Return the resources found with the ID `rid` and select the right one based on the configuration, or return all if no configuration was set. But we try to be generous here and at least try to resolve something: This...
def get_res_configs(self, rid, config=None, fallback=True): """ Return the resources found with the ID `rid` and select the right one based on the configuration, or return all if no configuration was set. But we try to be generous here and at least try to resolve something: This...
[ "Return", "the", "resources", "found", "with", "the", "ID", "rid", "and", "select", "the", "right", "one", "based", "on", "the", "configuration", "or", "return", "all", "if", "no", "configuration", "was", "set", "." ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L1877-L1918
[ "def", "get_res_configs", "(", "self", ",", "rid", ",", "config", "=", "None", ",", "fallback", "=", "True", ")", ":", "self", ".", "_analyse", "(", ")", "if", "not", "rid", ":", "raise", "ValueError", "(", "\"'rid' should be set\"", ")", "if", "not", ...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
ARSCParser.parse_id
Resolves an id from a binary XML file in the form "@[package:]DEADBEEF" and returns a tuple of package name and resource id. If no package name was given, i.e. the ID has the form "@DEADBEEF", the package name is set to None. Raises a ValueError if the id is malformed. :param n...
androguard/core/bytecodes/axml/__init__.py
def parse_id(name): """ Resolves an id from a binary XML file in the form "@[package:]DEADBEEF" and returns a tuple of package name and resource id. If no package name was given, i.e. the ID has the form "@DEADBEEF", the package name is set to None. Raises a ValueError i...
def parse_id(name): """ Resolves an id from a binary XML file in the form "@[package:]DEADBEEF" and returns a tuple of package name and resource id. If no package name was given, i.e. the ID has the form "@DEADBEEF", the package name is set to None. Raises a ValueError i...
[ "Resolves", "an", "id", "from", "a", "binary", "XML", "file", "in", "the", "form", "@", "[", "package", ":", "]", "DEADBEEF", "and", "returns", "a", "tuple", "of", "package", "name", "and", "resource", "id", ".", "If", "no", "package", "name", "was", ...
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L1953-L1984
[ "def", "parse_id", "(", "name", ")", ":", "if", "not", "name", ".", "startswith", "(", "'@'", ")", ":", "raise", "ValueError", "(", "\"Not a valid resource ID, must start with @: '{}'\"", ".", "format", "(", "name", ")", ")", "# remove @", "name", "=", "name",...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
ARSCParser.get_resource_xml_name
Returns the XML name for a resource, including the package name if package is None. A full name might look like `@com.example:string/foobar` Otherwise the name is only looked up in the specified package and is returned without the package name. The same example from about without the pac...
androguard/core/bytecodes/axml/__init__.py
def get_resource_xml_name(self, r_id, package=None): """ Returns the XML name for a resource, including the package name if package is None. A full name might look like `@com.example:string/foobar` Otherwise the name is only looked up in the specified package and is returned without ...
def get_resource_xml_name(self, r_id, package=None): """ Returns the XML name for a resource, including the package name if package is None. A full name might look like `@com.example:string/foobar` Otherwise the name is only looked up in the specified package and is returned without ...
[ "Returns", "the", "XML", "name", "for", "a", "resource", "including", "the", "package", "name", "if", "package", "is", "None", ".", "A", "full", "name", "might", "look", "like", "@com", ".", "example", ":", "string", "/", "foobar", "Otherwise", "the", "n...
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L1986-L2020
[ "def", "get_resource_xml_name", "(", "self", ",", "r_id", ",", "package", "=", "None", ")", ":", "if", "package", ":", "resource", ",", "name", ",", "i_id", "=", "self", ".", "get_id", "(", "package", ",", "r_id", ")", "if", "not", "i_id", ":", "retu...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
ARSCResTableConfig.get_language_and_region
Returns the combined language+region string or \x00\x00 for the default locale :return:
androguard/core/bytecodes/axml/__init__.py
def get_language_and_region(self): """ Returns the combined language+region string or \x00\x00 for the default locale :return: """ if self.locale != 0: _language = self._unpack_language_or_region([self.locale & 0xff, (self.locale & 0xff00) >> 8, ], ord('a')) ...
def get_language_and_region(self): """ Returns the combined language+region string or \x00\x00 for the default locale :return: """ if self.locale != 0: _language = self._unpack_language_or_region([self.locale & 0xff, (self.locale & 0xff00) >> 8, ], ord('a')) ...
[ "Returns", "the", "combined", "language", "+", "region", "string", "or", "\\", "x00", "\\", "x00", "for", "the", "default", "locale", ":", "return", ":" ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L2383-L2392
[ "def", "get_language_and_region", "(", "self", ")", ":", "if", "self", ".", "locale", "!=", "0", ":", "_language", "=", "self", ".", "_unpack_language_or_region", "(", "[", "self", ".", "locale", "&", "0xff", ",", "(", "self", ".", "locale", "&", "0xff00...
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
ARSCResStringPoolRef.format_value
Return the formatted (interpreted) data according to `data_type`.
androguard/core/bytecodes/axml/__init__.py
def format_value(self): """ Return the formatted (interpreted) data according to `data_type`. """ return format_value( self.data_type, self.data, self.parent.stringpool_main.getString )
def format_value(self): """ Return the formatted (interpreted) data according to `data_type`. """ return format_value( self.data_type, self.data, self.parent.stringpool_main.getString )
[ "Return", "the", "formatted", "(", "interpreted", ")", "data", "according", "to", "data_type", "." ]
androguard/androguard
python
https://github.com/androguard/androguard/blob/984c0d981be2950cf0451e484f7b0d4d53bc4911/androguard/core/bytecodes/axml/__init__.py#L2684-L2692
[ "def", "format_value", "(", "self", ")", ":", "return", "format_value", "(", "self", ".", "data_type", ",", "self", ".", "data", ",", "self", ".", "parent", ".", "stringpool_main", ".", "getString", ")" ]
984c0d981be2950cf0451e484f7b0d4d53bc4911
train
on_http_error
Manage GitlabHttpError exceptions. This decorator function can be used to catch GitlabHttpError exceptions raise specialized exceptions instead. Args: error(Exception): The exception type to raise -- must inherit from GitlabError
gitlab/exceptions.py
def on_http_error(error): """Manage GitlabHttpError exceptions. This decorator function can be used to catch GitlabHttpError exceptions raise specialized exceptions instead. Args: error(Exception): The exception type to raise -- must inherit from GitlabError """ def wrap(f)...
def on_http_error(error): """Manage GitlabHttpError exceptions. This decorator function can be used to catch GitlabHttpError exceptions raise specialized exceptions instead. Args: error(Exception): The exception type to raise -- must inherit from GitlabError """ def wrap(f)...
[ "Manage", "GitlabHttpError", "exceptions", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/exceptions.py#L241-L259
[ "def", "on_http_error", "(", "error", ")", ":", "def", "wrap", "(", "f", ")", ":", "@", "functools", ".", "wraps", "(", "f", ")", "def", "wrapped_f", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "try", ":", "return", "f", "(", "*", "arg...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
RESTObject.get_id
Returns the id of the resource.
gitlab/base.py
def get_id(self): """Returns the id of the resource.""" if self._id_attr is None or not hasattr(self, self._id_attr): return None return getattr(self, self._id_attr)
def get_id(self): """Returns the id of the resource.""" if self._id_attr is None or not hasattr(self, self._id_attr): return None return getattr(self, self._id_attr)
[ "Returns", "the", "id", "of", "the", "resource", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/base.py#L128-L132
[ "def", "get_id", "(", "self", ")", ":", "if", "self", ".", "_id_attr", "is", "None", "or", "not", "hasattr", "(", "self", ",", "self", ".", "_id_attr", ")", ":", "return", "None", "return", "getattr", "(", "self", ",", "self", ".", "_id_attr", ")" ]
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
UserProjectManager.list
Retrieve a list of objects. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_list (bool): If set to False and no pagination opt...
gitlab/v4/objects.py
def list(self, **kwargs): """Retrieve a list of objects. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_list (bool): ...
def list(self, **kwargs): """Retrieve a list of objects. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_list (bool): ...
[ "Retrieve", "a", "list", "of", "objects", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L221-L241
[ "def", "list", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'/users/%s/projects'", "%", "self", ".", "_parent", ".", "id", "return", "ListMixin", ".", "list", "(", "self", ",", "path", "=", "path", ",", "*", "*", "kwargs", ")" ]
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
User.block
Block the user. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabBlockError: If the user could not be blocked Returns: bool: Whether the user status has bee...
gitlab/v4/objects.py
def block(self, **kwargs): """Block the user. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabBlockError: If the user could not be blocked Returns: ...
def block(self, **kwargs): """Block the user. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabBlockError: If the user could not be blocked Returns: ...
[ "Block", "the", "user", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L258-L275
[ "def", "block", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'/users/%s/block'", "%", "self", ".", "id", "server_data", "=", "self", ".", "manager", ".", "gitlab", ".", "http_post", "(", "path", ",", "*", "*", "kwargs", ")", "if", ...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ApplicationSettingsManager.update
Update an object on the server. Args: id: ID of the object to update (can be None if not required) new_data: the update data for the object **kwargs: Extra options to send to the server (e.g. sudo) Returns: dict: The new object data (*not* a RESTObject) ...
gitlab/v4/objects.py
def update(self, id=None, new_data={}, **kwargs): """Update an object on the server. Args: id: ID of the object to update (can be None if not required) new_data: the update data for the object **kwargs: Extra options to send to the server (e.g. sudo) Returns...
def update(self, id=None, new_data={}, **kwargs): """Update an object on the server. Args: id: ID of the object to update (can be None if not required) new_data: the update data for the object **kwargs: Extra options to send to the server (e.g. sudo) Returns...
[ "Update", "an", "object", "on", "the", "server", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L427-L446
[ "def", "update", "(", "self", ",", "id", "=", "None", ",", "new_data", "=", "{", "}", ",", "*", "*", "kwargs", ")", ":", "data", "=", "new_data", ".", "copy", "(", ")", "if", "'domain_whitelist'", "in", "data", "and", "data", "[", "'domain_whitelist'...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
FeatureManager.set
Create or update the object. Args: name (str): The value to set for the object value (bool/int): The value to set for the object feature_group (str): A feature group name user (str): A GitLab username **kwargs: Extra options to send to the server (e.g...
gitlab/v4/objects.py
def set(self, name, value, feature_group=None, user=None, **kwargs): """Create or update the object. Args: name (str): The value to set for the object value (bool/int): The value to set for the object feature_group (str): A feature group name user (str): ...
def set(self, name, value, feature_group=None, user=None, **kwargs): """Create or update the object. Args: name (str): The value to set for the object value (bool/int): The value to set for the object feature_group (str): A feature group name user (str): ...
[ "Create", "or", "update", "the", "object", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L506-L526
[ "def", "set", "(", "self", ",", "name", ",", "value", ",", "feature_group", "=", "None", ",", "user", "=", "None", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s'", "%", "(", "self", ".", "path", ",", "name", ".", "replace", "(", "'/'", ...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
GroupEpicIssueManager.create
Create a new object. Args: data (dict): Parameters to send to the server to create the resource **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabC...
gitlab/v4/objects.py
def create(self, data, **kwargs): """Create a new object. Args: data (dict): Parameters to send to the server to create the resource **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If auth...
def create(self, data, **kwargs): """Create a new object. Args: data (dict): Parameters to send to the server to create the resource **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If auth...
[ "Create", "a", "new", "object", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L639-L662
[ "def", "create", "(", "self", ",", "data", ",", "*", "*", "kwargs", ")", ":", "CreateMixin", ".", "_check_missing_create_attrs", "(", "self", ",", "data", ")", "path", "=", "'%s/%s'", "%", "(", "self", ".", "path", ",", "data", ".", "pop", "(", "'iss...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
GroupMemberManager.all
List all the members, included inherited ones. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_list (bool): If set to False an...
gitlab/v4/objects.py
def all(self, **kwargs): """List all the members, included inherited ones. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) ...
def all(self, **kwargs): """List all the members, included inherited ones. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) ...
[ "List", "all", "the", "members", "included", "inherited", "ones", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L723-L744
[ "def", "all", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/all'", "%", "self", ".", "path", "obj", "=", "self", ".", "gitlab", ".", "http_list", "(", "path", ",", "*", "*", "kwargs", ")", "return", "[", "self", ".", "_obj_cls...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
GroupMilestone.issues
List issues related to this milestone. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_list (bool): If set to False and no pag...
gitlab/v4/objects.py
def issues(self, **kwargs): """List issues related to this milestone. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_...
def issues(self, **kwargs): """List issues related to this milestone. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_...
[ "List", "issues", "related", "to", "this", "milestone", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L768-L793
[ "def", "issues", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/issues'", "%", "(", "self", ".", "manager", ".", "path", ",", "self", ".", "get_id", "(", ")", ")", "data_list", "=", "self", ".", "manager", ".", "gitlab", ".", ...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
GroupMilestone.merge_requests
List the merge requests related to this milestone. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_list (bool): If set to Fals...
gitlab/v4/objects.py
def merge_requests(self, **kwargs): """List the merge requests related to this milestone. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with pag...
def merge_requests(self, **kwargs): """List the merge requests related to this milestone. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with pag...
[ "List", "the", "merge", "requests", "related", "to", "this", "milestone", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L797-L821
[ "def", "merge_requests", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/merge_requests'", "%", "(", "self", ".", "manager", ".", "path", ",", "self", ".", "get_id", "(", ")", ")", "data_list", "=", "self", ".", "manager", ".", "...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
Group.transfer_project
Transfer a project to this group. Args: to_project_id (int): ID of the project to transfer **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabTransferProjectError: If the pr...
gitlab/v4/objects.py
def transfer_project(self, to_project_id, **kwargs): """Transfer a project to this group. Args: to_project_id (int): ID of the project to transfer **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication ...
def transfer_project(self, to_project_id, **kwargs): """Transfer a project to this group. Args: to_project_id (int): ID of the project to transfer **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication ...
[ "Transfer", "a", "project", "to", "this", "group", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L901-L913
[ "def", "transfer_project", "(", "self", ",", "to_project_id", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'/groups/%s/projects/%s'", "%", "(", "self", ".", "id", ",", "to_project_id", ")", "self", ".", "manager", ".", "gitlab", ".", "http_post", "(", ...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
Group.add_ldap_group_link
Add an LDAP group link. Args: cn (str): CN of the LDAP group group_access (int): Minimum access level for members of the LDAP group provider (str): LDAP provider for the LDAP group **kwargs: Extra options to send to the server (e.g. sudo) ...
gitlab/v4/objects.py
def add_ldap_group_link(self, cn, group_access, provider, **kwargs): """Add an LDAP group link. Args: cn (str): CN of the LDAP group group_access (int): Minimum access level for members of the LDAP group provider (str): LDAP provider for the LDAP grou...
def add_ldap_group_link(self, cn, group_access, provider, **kwargs): """Add an LDAP group link. Args: cn (str): CN of the LDAP group group_access (int): Minimum access level for members of the LDAP group provider (str): LDAP provider for the LDAP grou...
[ "Add", "an", "LDAP", "group", "link", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L938-L954
[ "def", "add_ldap_group_link", "(", "self", ",", "cn", ",", "group_access", ",", "provider", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'/groups/%s/ldap_group_links'", "%", "self", ".", "get_id", "(", ")", "data", "=", "{", "'cn'", ":", "cn", ",", ...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
Group.delete_ldap_group_link
Delete an LDAP group link. Args: cn (str): CN of the LDAP group provider (str): LDAP provider for the LDAP group **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct Git...
gitlab/v4/objects.py
def delete_ldap_group_link(self, cn, provider=None, **kwargs): """Delete an LDAP group link. Args: cn (str): CN of the LDAP group provider (str): LDAP provider for the LDAP group **kwargs: Extra options to send to the server (e.g. sudo) Raises: G...
def delete_ldap_group_link(self, cn, provider=None, **kwargs): """Delete an LDAP group link. Args: cn (str): CN of the LDAP group provider (str): LDAP provider for the LDAP group **kwargs: Extra options to send to the server (e.g. sudo) Raises: G...
[ "Delete", "an", "LDAP", "group", "link", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L958-L974
[ "def", "delete_ldap_group_link", "(", "self", ",", "cn", ",", "provider", "=", "None", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'/groups/%s/ldap_group_links'", "%", "self", ".", "get_id", "(", ")", "if", "provider", "is", "not", "None", ":", "pat...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
Group.ldap_sync
Sync LDAP groups. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabCreateError: If the server cannot perform the request
gitlab/v4/objects.py
def ldap_sync(self, **kwargs): """Sync LDAP groups. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabCreateError: If the server cannot perform the request """ ...
def ldap_sync(self, **kwargs): """Sync LDAP groups. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabCreateError: If the server cannot perform the request """ ...
[ "Sync", "LDAP", "groups", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L978-L989
[ "def", "ldap_sync", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'/groups/%s/ldap_sync'", "%", "self", ".", "get_id", "(", ")", "self", ".", "manager", ".", "gitlab", ".", "http_post", "(", "path", ",", "*", "*", "kwargs", ")" ]
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
LDAPGroupManager.list
Retrieve a list of objects. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_list (bool): If set to False and no pagination opt...
gitlab/v4/objects.py
def list(self, **kwargs): """Retrieve a list of objects. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_list (bool): ...
def list(self, **kwargs): """Retrieve a list of objects. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_list (bool): ...
[ "Retrieve", "a", "list", "of", "objects", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L1045-L1076
[ "def", "list", "(", "self", ",", "*", "*", "kwargs", ")", ":", "data", "=", "kwargs", ".", "copy", "(", ")", "if", "self", ".", "gitlab", ".", "per_page", ":", "data", ".", "setdefault", "(", "'per_page'", ",", "self", ".", "gitlab", ".", "per_page...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectBranch.protect
Protect the branch. Args: developers_can_push (bool): Set to True if developers are allowed to push to the branch developers_can_merge (bool): Set to True if developers are allowed to merge to the branch ...
gitlab/v4/objects.py
def protect(self, developers_can_push=False, developers_can_merge=False, **kwargs): """Protect the branch. Args: developers_can_push (bool): Set to True if developers are allowed to push to the branch developers_can_merge (...
def protect(self, developers_can_push=False, developers_can_merge=False, **kwargs): """Protect the branch. Args: developers_can_push (bool): Set to True if developers are allowed to push to the branch developers_can_merge (...
[ "Protect", "the", "branch", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L1211-L1231
[ "def", "protect", "(", "self", ",", "developers_can_push", "=", "False", ",", "developers_can_merge", "=", "False", ",", "*", "*", "kwargs", ")", ":", "id", "=", "self", ".", "get_id", "(", ")", ".", "replace", "(", "'/'", ",", "'%2F'", ")", "path", ...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectBranch.unprotect
Unprotect the branch. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabProtectError: If the branch could not be unprotected
gitlab/v4/objects.py
def unprotect(self, **kwargs): """Unprotect the branch. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabProtectError: If the branch could not be unprotected """...
def unprotect(self, **kwargs): """Unprotect the branch. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabProtectError: If the branch could not be unprotected """...
[ "Unprotect", "the", "branch", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L1235-L1248
[ "def", "unprotect", "(", "self", ",", "*", "*", "kwargs", ")", ":", "id", "=", "self", ".", "get_id", "(", ")", ".", "replace", "(", "'/'", ",", "'%2F'", ")", "path", "=", "'%s/%s/unprotect'", "%", "(", "self", ".", "manager", ".", "path", ",", "...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectJob.cancel
Cancel the job. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabJobCancelError: If the job could not be canceled
gitlab/v4/objects.py
def cancel(self, **kwargs): """Cancel the job. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabJobCancelError: If the job could not be canceled """ path...
def cancel(self, **kwargs): """Cancel the job. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabJobCancelError: If the job could not be canceled """ path...
[ "Cancel", "the", "job", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L1272-L1283
[ "def", "cancel", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/cancel'", "%", "(", "self", ".", "manager", ".", "path", ",", "self", ".", "get_id", "(", ")", ")", "self", ".", "manager", ".", "gitlab", ".", "http_post", "(", ...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectJob.retry
Retry the job. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabJobRetryError: If the job could not be retried
gitlab/v4/objects.py
def retry(self, **kwargs): """Retry the job. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabJobRetryError: If the job could not be retried """ path = '...
def retry(self, **kwargs): """Retry the job. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabJobRetryError: If the job could not be retried """ path = '...
[ "Retry", "the", "job", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L1287-L1298
[ "def", "retry", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/retry'", "%", "(", "self", ".", "manager", ".", "path", ",", "self", ".", "get_id", "(", ")", ")", "self", ".", "manager", ".", "gitlab", ".", "http_post", "(", ...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectJob.play
Trigger a job explicitly. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabJobPlayError: If the job could not be triggered
gitlab/v4/objects.py
def play(self, **kwargs): """Trigger a job explicitly. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabJobPlayError: If the job could not be triggered """ ...
def play(self, **kwargs): """Trigger a job explicitly. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabJobPlayError: If the job could not be triggered """ ...
[ "Trigger", "a", "job", "explicitly", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L1302-L1313
[ "def", "play", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/play'", "%", "(", "self", ".", "manager", ".", "path", ",", "self", ".", "get_id", "(", ")", ")", "self", ".", "manager", ".", "gitlab", ".", "http_post", "(", "p...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectJob.erase
Erase the job (remove job artifacts and trace). Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabJobEraseError: If the job could not be erased
gitlab/v4/objects.py
def erase(self, **kwargs): """Erase the job (remove job artifacts and trace). Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabJobEraseError: If the job could not be era...
def erase(self, **kwargs): """Erase the job (remove job artifacts and trace). Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabJobEraseError: If the job could not be era...
[ "Erase", "the", "job", "(", "remove", "job", "artifacts", "and", "trace", ")", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L1317-L1328
[ "def", "erase", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/erase'", "%", "(", "self", ".", "manager", ".", "path", ",", "self", ".", "get_id", "(", ")", ")", "self", ".", "manager", ".", "gitlab", ".", "http_post", "(", ...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectJob.keep_artifacts
Prevent artifacts from being deleted when expiration is set. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabCreateError: If the request could not be performed
gitlab/v4/objects.py
def keep_artifacts(self, **kwargs): """Prevent artifacts from being deleted when expiration is set. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabCreateError: If the ...
def keep_artifacts(self, **kwargs): """Prevent artifacts from being deleted when expiration is set. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabCreateError: If the ...
[ "Prevent", "artifacts", "from", "being", "deleted", "when", "expiration", "is", "set", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L1332-L1343
[ "def", "keep_artifacts", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/artifacts/keep'", "%", "(", "self", ".", "manager", ".", "path", ",", "self", ".", "get_id", "(", ")", ")", "self", ".", "manager", ".", "gitlab", ".", "htt...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectCommitStatusManager.create
Create a new object. Args: data (dict): Parameters to send to the server to create the resource **kwargs: Extra options to send to the server (e.g. sudo or 'ref_name', 'stage', 'name', 'all') Raises: GitlabAuthenticatio...
gitlab/v4/objects.py
def create(self, data, **kwargs): """Create a new object. Args: data (dict): Parameters to send to the server to create the resource **kwargs: Extra options to send to the server (e.g. sudo or 'ref_name', 'stage', 'name', 'all') ...
def create(self, data, **kwargs): """Create a new object. Args: data (dict): Parameters to send to the server to create the resource **kwargs: Extra options to send to the server (e.g. sudo or 'ref_name', 'stage', 'name', 'all') ...
[ "Create", "a", "new", "object", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L1447-L1472
[ "def", "create", "(", "self", ",", "data", ",", "*", "*", "kwargs", ")", ":", "# project_id and commit_id are in the data dict when using the CLI, but", "# they are missing when using only the API", "# See #511", "base_path", "=", "'/projects/%(project_id)s/statuses/%(commit_id)s'"...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectCommit.diff
Generate the commit diff. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabGetError: If the diff could not be retrieved Returns: list: The changes done in t...
gitlab/v4/objects.py
def diff(self, **kwargs): """Generate the commit diff. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabGetError: If the diff could not be retrieved Returns: ...
def diff(self, **kwargs): """Generate the commit diff. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabGetError: If the diff could not be retrieved Returns: ...
[ "Generate", "the", "commit", "diff", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L1526-L1540
[ "def", "diff", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/diff'", "%", "(", "self", ".", "manager", ".", "path", ",", "self", ".", "get_id", "(", ")", ")", "return", "self", ".", "manager", ".", "gitlab", ".", "http_get", ...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectCommit.cherry_pick
Cherry-pick a commit into a branch. Args: branch (str): Name of target branch **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabCherryPickError: If the cherry-pick could no...
gitlab/v4/objects.py
def cherry_pick(self, branch, **kwargs): """Cherry-pick a commit into a branch. Args: branch (str): Name of target branch **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct ...
def cherry_pick(self, branch, **kwargs): """Cherry-pick a commit into a branch. Args: branch (str): Name of target branch **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct ...
[ "Cherry", "-", "pick", "a", "commit", "into", "a", "branch", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L1544-L1557
[ "def", "cherry_pick", "(", "self", ",", "branch", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/cherry_pick'", "%", "(", "self", ".", "manager", ".", "path", ",", "self", ".", "get_id", "(", ")", ")", "post_data", "=", "{", "'branch'", ":",...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectCommit.refs
List the references the commit is pushed to. Args: type (str): The scope of references ('branch', 'tag' or 'all') **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabGetError...
gitlab/v4/objects.py
def refs(self, type='all', **kwargs): """List the references the commit is pushed to. Args: type (str): The scope of references ('branch', 'tag' or 'all') **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authent...
def refs(self, type='all', **kwargs): """List the references the commit is pushed to. Args: type (str): The scope of references ('branch', 'tag' or 'all') **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authent...
[ "List", "the", "references", "the", "commit", "is", "pushed", "to", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L1561-L1577
[ "def", "refs", "(", "self", ",", "type", "=", "'all'", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/refs'", "%", "(", "self", ".", "manager", ".", "path", ",", "self", ".", "get_id", "(", ")", ")", "data", "=", "{", "'type'", ":", "t...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectCommit.merge_requests
List the merge requests related to the commit. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabGetError: If the references could not be retrieved Returns: ...
gitlab/v4/objects.py
def merge_requests(self, **kwargs): """List the merge requests related to the commit. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabGetError: If the references could ...
def merge_requests(self, **kwargs): """List the merge requests related to the commit. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabGetError: If the references could ...
[ "List", "the", "merge", "requests", "related", "to", "the", "commit", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L1581-L1595
[ "def", "merge_requests", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/merge_requests'", "%", "(", "self", ".", "manager", ".", "path", ",", "self", ".", "get_id", "(", ")", ")", "return", "self", ".", "manager", ".", "gitlab", ...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectEnvironment.stop
Stop the environment. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabStopError: If the operation failed
gitlab/v4/objects.py
def stop(self, **kwargs): """Stop the environment. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabStopError: If the operation failed """ path = '%s/%s/...
def stop(self, **kwargs): """Stop the environment. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabStopError: If the operation failed """ path = '%s/%s/...
[ "Stop", "the", "environment", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L1609-L1620
[ "def", "stop", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/stop'", "%", "(", "self", ".", "manager", ".", "path", ",", "self", ".", "get_id", "(", ")", ")", "self", ".", "manager", ".", "gitlab", ".", "http_post", "(", "p...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectKeyManager.enable
Enable a deploy key for a project. Args: key_id (int): The ID of the key to enable **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabProjectDeployKeyError: If the key could...
gitlab/v4/objects.py
def enable(self, key_id, **kwargs): """Enable a deploy key for a project. Args: key_id (int): The ID of the key to enable **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct ...
def enable(self, key_id, **kwargs): """Enable a deploy key for a project. Args: key_id (int): The ID of the key to enable **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct ...
[ "Enable", "a", "deploy", "key", "for", "a", "project", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L1645-L1657
[ "def", "enable", "(", "self", ",", "key_id", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/enable'", "%", "(", "self", ".", "path", ",", "key_id", ")", "self", ".", "gitlab", ".", "http_post", "(", "path", ",", "*", "*", "kwargs", ")" ]
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectForkManager.list
Retrieve a list of objects. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_list (bool): If set to False and no pagination opt...
gitlab/v4/objects.py
def list(self, **kwargs): """Retrieve a list of objects. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_list (bool): ...
def list(self, **kwargs): """Retrieve a list of objects. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_list (bool): ...
[ "Retrieve", "a", "list", "of", "objects", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L1696-L1716
[ "def", "list", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_compute_path", "(", "'/projects/%(project_id)s/forks'", ")", "return", "ListMixin", ".", "list", "(", "self", ",", "path", "=", "path", ",", "*", "*", "kwargs", ...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectIssueLinkManager.create
Create a new object. Args: data (dict): parameters to send to the server to create the resource **kwargs: Extra options to send to the server (e.g. sudo) Returns: RESTObject, RESTObject: The source and target issues Raises: ...
gitlab/v4/objects.py
def create(self, data, **kwargs): """Create a new object. Args: data (dict): parameters to send to the server to create the resource **kwargs: Extra options to send to the server (e.g. sudo) Returns: RESTObject, RESTObject: The sourc...
def create(self, data, **kwargs): """Create a new object. Args: data (dict): parameters to send to the server to create the resource **kwargs: Extra options to send to the server (e.g. sudo) Returns: RESTObject, RESTObject: The sourc...
[ "Create", "a", "new", "object", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L1819-L1841
[ "def", "create", "(", "self", ",", "data", ",", "*", "*", "kwargs", ")", ":", "self", ".", "_check_missing_create_attrs", "(", "data", ")", "server_data", "=", "self", ".", "gitlab", ".", "http_post", "(", "self", ".", "path", ",", "post_data", "=", "d...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectIssue.move
Move the issue to another project. Args: to_project_id(int): ID of the target project **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabUpdateError: If the issue could not ...
gitlab/v4/objects.py
def move(self, to_project_id, **kwargs): """Move the issue to another project. Args: to_project_id(int): ID of the target project **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct ...
def move(self, to_project_id, **kwargs): """Move the issue to another project. Args: to_project_id(int): ID of the target project **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct ...
[ "Move", "the", "issue", "to", "another", "project", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L1870-L1885
[ "def", "move", "(", "self", ",", "to_project_id", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/move'", "%", "(", "self", ".", "manager", ".", "path", ",", "self", ".", "get_id", "(", ")", ")", "data", "=", "{", "'to_project_id'", ":", "t...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectIssue.closed_by
List merge requests that will close the issue when merged. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabGetErrot: If the merge requests could not be retrieved Retur...
gitlab/v4/objects.py
def closed_by(self, **kwargs): """List merge requests that will close the issue when merged. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabGetErrot: If the merge requ...
def closed_by(self, **kwargs): """List merge requests that will close the issue when merged. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabGetErrot: If the merge requ...
[ "List", "merge", "requests", "that", "will", "close", "the", "issue", "when", "merged", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L1889-L1903
[ "def", "closed_by", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/closed_by'", "%", "(", "self", ".", "manager", ".", "path", ",", "self", ".", "get_id", "(", ")", ")", "return", "self", ".", "manager", ".", "gitlab", ".", "h...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectTag.set_release_description
Set the release notes on the tag. If the release doesn't exist yet, it will be created. If it already exists, its description will be updated. Args: description (str): Description of the release. **kwargs: Extra options to send to the server (e.g. sudo) Raises:...
gitlab/v4/objects.py
def set_release_description(self, description, **kwargs): """Set the release notes on the tag. If the release doesn't exist yet, it will be created. If it already exists, its description will be updated. Args: description (str): Description of the release. **kwa...
def set_release_description(self, description, **kwargs): """Set the release notes on the tag. If the release doesn't exist yet, it will be created. If it already exists, its description will be updated. Args: description (str): Description of the release. **kwa...
[ "Set", "the", "release", "notes", "on", "the", "tag", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L2012-L2044
[ "def", "set_release_description", "(", "self", ",", "description", ",", "*", "*", "kwargs", ")", ":", "id", "=", "self", ".", "get_id", "(", ")", ".", "replace", "(", "'/'", ",", "'%2F'", ")", "path", "=", "'%s/%s/release'", "%", "(", "self", ".", "m...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectMergeRequestApprovalManager.set_approvers
Change MR-level allowed approvers and approver groups. Args: approver_ids (list): User IDs that can approve MRs approver_group_ids (list): Group IDs whose members can approve MRs Raises: GitlabAuthenticationError: If authentication is not correct GitlabU...
gitlab/v4/objects.py
def set_approvers(self, approver_ids=[], approver_group_ids=[], **kwargs): """Change MR-level allowed approvers and approver groups. Args: approver_ids (list): User IDs that can approve MRs approver_group_ids (list): Group IDs whose members can approve MRs Raises: ...
def set_approvers(self, approver_ids=[], approver_group_ids=[], **kwargs): """Change MR-level allowed approvers and approver groups. Args: approver_ids (list): User IDs that can approve MRs approver_group_ids (list): Group IDs whose members can approve MRs Raises: ...
[ "Change", "MR", "-", "level", "allowed", "approvers", "and", "approver", "groups", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L2079-L2094
[ "def", "set_approvers", "(", "self", ",", "approver_ids", "=", "[", "]", ",", "approver_group_ids", "=", "[", "]", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/approvers'", "%", "(", "self", ".", "_parent", ".", "manager", ".", "path", ",", ...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectMergeRequest.cancel_merge_when_pipeline_succeeds
Cancel merge when the pipeline succeeds. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabMROnBuildSuccessError: If the server could not handle the request
gitlab/v4/objects.py
def cancel_merge_when_pipeline_succeeds(self, **kwargs): """Cancel merge when the pipeline succeeds. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabMROnBuildSuccessErr...
def cancel_merge_when_pipeline_succeeds(self, **kwargs): """Cancel merge when the pipeline succeeds. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabMROnBuildSuccessErr...
[ "Cancel", "merge", "when", "the", "pipeline", "succeeds", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L2203-L2218
[ "def", "cancel_merge_when_pipeline_succeeds", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "(", "'%s/%s/cancel_merge_when_pipeline_succeeds'", "%", "(", "self", ".", "manager", ".", "path", ",", "self", ".", "get_id", "(", ")", ")", ")", "ser...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectMergeRequest.commits
List the merge request commits. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_list (bool): If set to False and no pagination...
gitlab/v4/objects.py
def commits(self, **kwargs): """List the merge request commits. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_list (...
def commits(self, **kwargs): """List the merge request commits. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_list (...
[ "List", "the", "merge", "request", "commits", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L2249-L2273
[ "def", "commits", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/commits'", "%", "(", "self", ".", "manager", ".", "path", ",", "self", ".", "get_id", "(", ")", ")", "data_list", "=", "self", ".", "manager", ".", "gitlab", "."...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectMergeRequest.changes
List the merge request changes. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabListError: If the list could not be retrieved Returns: RESTObjectList: List...
gitlab/v4/objects.py
def changes(self, **kwargs): """List the merge request changes. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabListError: If the list could not be retrieved R...
def changes(self, **kwargs): """List the merge request changes. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabListError: If the list could not be retrieved R...
[ "List", "the", "merge", "request", "changes", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L2277-L2291
[ "def", "changes", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/changes'", "%", "(", "self", ".", "manager", ".", "path", ",", "self", ".", "get_id", "(", ")", ")", "return", "self", ".", "manager", ".", "gitlab", ".", "http_...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectMergeRequest.pipelines
List the merge request pipelines. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabListError: If the list could not be retrieved Returns: RESTObjectList: Li...
gitlab/v4/objects.py
def pipelines(self, **kwargs): """List the merge request pipelines. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabListError: If the list could not be retrieved ...
def pipelines(self, **kwargs): """List the merge request pipelines. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabListError: If the list could not be retrieved ...
[ "List", "the", "merge", "request", "pipelines", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L2295-L2310
[ "def", "pipelines", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/pipelines'", "%", "(", "self", ".", "manager", ".", "path", ",", "self", ".", "get_id", "(", ")", ")", "return", "self", ".", "manager", ".", "gitlab", ".", "h...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectMergeRequest.approve
Approve the merge request. Args: sha (str): Head SHA of MR **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabMRApprovalError: If the approval failed
gitlab/v4/objects.py
def approve(self, sha=None, **kwargs): """Approve the merge request. Args: sha (str): Head SHA of MR **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabMRApprovalErr...
def approve(self, sha=None, **kwargs): """Approve the merge request. Args: sha (str): Head SHA of MR **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabMRApprovalErr...
[ "Approve", "the", "merge", "request", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L2314-L2332
[ "def", "approve", "(", "self", ",", "sha", "=", "None", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/approve'", "%", "(", "self", ".", "manager", ".", "path", ",", "self", ".", "get_id", "(", ")", ")", "data", "=", "{", "}", "if", "s...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectMergeRequest.unapprove
Unapprove the merge request. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabMRApprovalError: If the unapproval failed
gitlab/v4/objects.py
def unapprove(self, **kwargs): """Unapprove the merge request. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabMRApprovalError: If the unapproval failed """ ...
def unapprove(self, **kwargs): """Unapprove the merge request. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabMRApprovalError: If the unapproval failed """ ...
[ "Unapprove", "the", "merge", "request", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L2336-L2351
[ "def", "unapprove", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/unapprove'", "%", "(", "self", ".", "manager", ".", "path", ",", "self", ".", "get_id", "(", ")", ")", "data", "=", "{", "}", "server_data", "=", "self", ".", ...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectMergeRequest.merge
Accept the merge request. Args: merge_commit_message (bool): Commit message should_remove_source_branch (bool): If True, removes the source branch merge_when_pipeline_succeeds (bool): Wait for the build to succeed, ...
gitlab/v4/objects.py
def merge(self, merge_commit_message=None, should_remove_source_branch=False, merge_when_pipeline_succeeds=False, **kwargs): """Accept the merge request. Args: merge_commit_message (bool): Commit message should_remove_source_branch (bool...
def merge(self, merge_commit_message=None, should_remove_source_branch=False, merge_when_pipeline_succeeds=False, **kwargs): """Accept the merge request. Args: merge_commit_message (bool): Commit message should_remove_source_branch (bool...
[ "Accept", "the", "merge", "request", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L2358-L2387
[ "def", "merge", "(", "self", ",", "merge_commit_message", "=", "None", ",", "should_remove_source_branch", "=", "False", ",", "merge_when_pipeline_succeeds", "=", "False", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/merge'", "%", "(", "self", ".", ...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectMilestone.issues
List issues related to this milestone. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_list (bool): If set to False and no pag...
gitlab/v4/objects.py
def issues(self, **kwargs): """List issues related to this milestone. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_...
def issues(self, **kwargs): """List issues related to this milestone. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_...
[ "List", "issues", "related", "to", "this", "milestone", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L2418-L2443
[ "def", "issues", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/issues'", "%", "(", "self", ".", "manager", ".", "path", ",", "self", ".", "get_id", "(", ")", ")", "data_list", "=", "self", ".", "manager", ".", "gitlab", ".", ...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectMilestone.merge_requests
List the merge requests related to this milestone. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_list (bool): If set to Fals...
gitlab/v4/objects.py
def merge_requests(self, **kwargs): """List the merge requests related to this milestone. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with pag...
def merge_requests(self, **kwargs): """List the merge requests related to this milestone. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with pag...
[ "List", "the", "merge", "requests", "related", "to", "this", "milestone", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L2447-L2471
[ "def", "merge_requests", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/merge_requests'", "%", "(", "self", ".", "manager", ".", "path", ",", "self", ".", "get_id", "(", ")", ")", "data_list", "=", "self", ".", "manager", ".", "...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectLabelManager.delete
Delete a Label on the server. Args: name: The name of the label **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabDeleteError: If the server cannot perform the request
gitlab/v4/objects.py
def delete(self, name, **kwargs): """Delete a Label on the server. Args: name: The name of the label **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabDeleteError: ...
def delete(self, name, **kwargs): """Delete a Label on the server. Args: name: The name of the label **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabDeleteError: ...
[ "Delete", "a", "Label", "on", "the", "server", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L2521-L2532
[ "def", "delete", "(", "self", ",", "name", ",", "*", "*", "kwargs", ")", ":", "self", ".", "gitlab", ".", "http_delete", "(", "self", ".", "path", ",", "query_data", "=", "{", "'name'", ":", "name", "}", ",", "*", "*", "kwargs", ")" ]
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectFile.save
Save the changes made to the file to the server. The object is updated to match what the server returns. Args: branch (str): Branch in which the file will be updated commit_message (str): Message to send with the commit **kwargs: Extra options to send to the server ...
gitlab/v4/objects.py
def save(self, branch, commit_message, **kwargs): """Save the changes made to the file to the server. The object is updated to match what the server returns. Args: branch (str): Branch in which the file will be updated commit_message (str): Message to send with the comm...
def save(self, branch, commit_message, **kwargs): """Save the changes made to the file to the server. The object is updated to match what the server returns. Args: branch (str): Branch in which the file will be updated commit_message (str): Message to send with the comm...
[ "Save", "the", "changes", "made", "to", "the", "file", "to", "the", "server", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L2547-L2564
[ "def", "save", "(", "self", ",", "branch", ",", "commit_message", ",", "*", "*", "kwargs", ")", ":", "self", ".", "branch", "=", "branch", "self", ".", "commit_message", "=", "commit_message", "self", ".", "file_path", "=", "self", ".", "file_path", ".",...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectFile.delete
Delete the file from the server. Args: branch (str): Branch from which the file will be removed commit_message (str): Commit message for the deletion **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authenti...
gitlab/v4/objects.py
def delete(self, branch, commit_message, **kwargs): """Delete the file from the server. Args: branch (str): Branch from which the file will be removed commit_message (str): Commit message for the deletion **kwargs: Extra options to send to the server (e.g. sudo) ...
def delete(self, branch, commit_message, **kwargs): """Delete the file from the server. Args: branch (str): Branch from which the file will be removed commit_message (str): Commit message for the deletion **kwargs: Extra options to send to the server (e.g. sudo) ...
[ "Delete", "the", "file", "from", "the", "server", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L2566-L2579
[ "def", "delete", "(", "self", ",", "branch", ",", "commit_message", ",", "*", "*", "kwargs", ")", ":", "file_path", "=", "self", ".", "get_id", "(", ")", ".", "replace", "(", "'/'", ",", "'%2F'", ")", "self", ".", "manager", ".", "delete", "(", "fi...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectFileManager.get
Retrieve a single file. Args: file_path (str): Path of the file to retrieve ref (str): Name of the branch, tag or commit **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct ...
gitlab/v4/objects.py
def get(self, file_path, ref, **kwargs): """Retrieve a single file. Args: file_path (str): Path of the file to retrieve ref (str): Name of the branch, tag or commit **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthentic...
def get(self, file_path, ref, **kwargs): """Retrieve a single file. Args: file_path (str): Path of the file to retrieve ref (str): Name of the branch, tag or commit **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthentic...
[ "Retrieve", "a", "single", "file", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L2593-L2609
[ "def", "get", "(", "self", ",", "file_path", ",", "ref", ",", "*", "*", "kwargs", ")", ":", "file_path", "=", "file_path", ".", "replace", "(", "'/'", ",", "'%2F'", ")", "return", "GetMixin", ".", "get", "(", "self", ",", "file_path", ",", "ref", "...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectFileManager.create
Create a new object. Args: data (dict): parameters to send to the server to create the resource **kwargs: Extra options to send to the server (e.g. sudo) Returns: RESTObject: a new instance of the managed object class built with ...
gitlab/v4/objects.py
def create(self, data, **kwargs): """Create a new object. Args: data (dict): parameters to send to the server to create the resource **kwargs: Extra options to send to the server (e.g. sudo) Returns: RESTObject: a new instance of the...
def create(self, data, **kwargs): """Create a new object. Args: data (dict): parameters to send to the server to create the resource **kwargs: Extra options to send to the server (e.g. sudo) Returns: RESTObject: a new instance of the...
[ "Create", "a", "new", "object", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L2616-L2638
[ "def", "create", "(", "self", ",", "data", ",", "*", "*", "kwargs", ")", ":", "self", ".", "_check_missing_create_attrs", "(", "data", ")", "new_data", "=", "data", ".", "copy", "(", ")", "file_path", "=", "new_data", ".", "pop", "(", "'file_path'", ")...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectFileManager.update
Update an object on the server. Args: id: ID of the object to update (can be None if not required) new_data: the update data for the object **kwargs: Extra options to send to the server (e.g. sudo) Returns: dict: The new object data (*not* a RESTObject) ...
gitlab/v4/objects.py
def update(self, file_path, new_data={}, **kwargs): """Update an object on the server. Args: id: ID of the object to update (can be None if not required) new_data: the update data for the object **kwargs: Extra options to send to the server (e.g. sudo) Retur...
def update(self, file_path, new_data={}, **kwargs): """Update an object on the server. Args: id: ID of the object to update (can be None if not required) new_data: the update data for the object **kwargs: Extra options to send to the server (e.g. sudo) Retur...
[ "Update", "an", "object", "on", "the", "server", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L2641-L2662
[ "def", "update", "(", "self", ",", "file_path", ",", "new_data", "=", "{", "}", ",", "*", "*", "kwargs", ")", ":", "data", "=", "new_data", ".", "copy", "(", ")", "file_path", "=", "file_path", ".", "replace", "(", "'/'", ",", "'%2F'", ")", "data",...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectFileManager.delete
Delete a file on the server. Args: file_path (str): Path of the file to remove branch (str): Branch from which the file will be removed commit_message (str): Commit message for the deletion **kwargs: Extra options to send to the server (e.g. sudo) Raises...
gitlab/v4/objects.py
def delete(self, file_path, branch, commit_message, **kwargs): """Delete a file on the server. Args: file_path (str): Path of the file to remove branch (str): Branch from which the file will be removed commit_message (str): Commit message for the deletion ...
def delete(self, file_path, branch, commit_message, **kwargs): """Delete a file on the server. Args: file_path (str): Path of the file to remove branch (str): Branch from which the file will be removed commit_message (str): Commit message for the deletion ...
[ "Delete", "a", "file", "on", "the", "server", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L2667-L2682
[ "def", "delete", "(", "self", ",", "file_path", ",", "branch", ",", "commit_message", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s'", "%", "(", "self", ".", "path", ",", "file_path", ".", "replace", "(", "'/'", ",", "'%2F'", ")", ")", "d...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectFileManager.raw
Return the content of a file for a commit. Args: ref (str): ID of the commit filepath (str): Path of the file to return streamed (bool): If True the data will be processed by chunks of `chunk_size` and each chunk is passed to `action` for trea...
gitlab/v4/objects.py
def raw(self, file_path, ref, streamed=False, action=None, chunk_size=1024, **kwargs): """Return the content of a file for a commit. Args: ref (str): ID of the commit filepath (str): Path of the file to return streamed (bool): If True the data will be pro...
def raw(self, file_path, ref, streamed=False, action=None, chunk_size=1024, **kwargs): """Return the content of a file for a commit. Args: ref (str): ID of the commit filepath (str): Path of the file to return streamed (bool): If True the data will be pro...
[ "Return", "the", "content", "of", "a", "file", "for", "a", "commit", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L2686-L2713
[ "def", "raw", "(", "self", ",", "file_path", ",", "ref", ",", "streamed", "=", "False", ",", "action", "=", "None", ",", "chunk_size", "=", "1024", ",", "*", "*", "kwargs", ")", ":", "file_path", "=", "file_path", ".", "replace", "(", "'/'", ",", "...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectPipelineManager.create
Creates a new object. Args: data (dict): Parameters to send to the server to create the resource **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct Gitlab...
gitlab/v4/objects.py
def create(self, data, **kwargs): """Creates a new object. Args: data (dict): Parameters to send to the server to create the resource **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If aut...
def create(self, data, **kwargs): """Creates a new object. Args: data (dict): Parameters to send to the server to create the resource **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If aut...
[ "Creates", "a", "new", "object", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L2771-L2788
[ "def", "create", "(", "self", ",", "data", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "path", "[", ":", "-", "1", "]", "# drop the 's'", "return", "CreateMixin", ".", "create", "(", "self", ",", "data", ",", "path", "=", "path", ...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectPipelineSchedule.take_ownership
Update the owner of a pipeline schedule. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabOwnershipError: If the request failed
gitlab/v4/objects.py
def take_ownership(self, **kwargs): """Update the owner of a pipeline schedule. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabOwnershipError: If the request failed ...
def take_ownership(self, **kwargs): """Update the owner of a pipeline schedule. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabOwnershipError: If the request failed ...
[ "Update", "the", "owner", "of", "a", "pipeline", "schedule", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L2812-L2824
[ "def", "take_ownership", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "'%s/%s/take_ownership'", "%", "(", "self", ".", "manager", ".", "path", ",", "self", ".", "get_id", "(", ")", ")", "server_data", "=", "self", ".", "manager", ".", ...
16de1b03fde3dbbe8f851614dd1d8c09de102fe5
train
ProjectServiceManager.get
Retrieve a single object. Args: id (int or str): ID of the object to retrieve lazy (bool): If True, don't request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to...
gitlab/v4/objects.py
def get(self, id, **kwargs): """Retrieve a single object. Args: id (int or str): ID of the object to retrieve lazy (bool): If True, don't request the server, but create a shallow object giving access to the managers. This is usef...
def get(self, id, **kwargs): """Retrieve a single object. Args: id (int or str): ID of the object to retrieve lazy (bool): If True, don't request the server, but create a shallow object giving access to the managers. This is usef...
[ "Retrieve", "a", "single", "object", "." ]
python-gitlab/python-gitlab
python
https://github.com/python-gitlab/python-gitlab/blob/16de1b03fde3dbbe8f851614dd1d8c09de102fe5/gitlab/v4/objects.py#L3065-L3084
[ "def", "get", "(", "self", ",", "id", ",", "*", "*", "kwargs", ")", ":", "obj", "=", "super", "(", "ProjectServiceManager", ",", "self", ")", ".", "get", "(", "id", ",", "*", "*", "kwargs", ")", "obj", ".", "id", "=", "id", "return", "obj" ]
16de1b03fde3dbbe8f851614dd1d8c09de102fe5