repo
stringlengths
7
54
path
stringlengths
4
223
func_name
stringlengths
1
134
original_string
stringlengths
75
104k
language
stringclasses
1 value
code
stringlengths
75
104k
code_tokens
listlengths
20
28.4k
docstring
stringlengths
1
46.3k
docstring_tokens
listlengths
1
1.66k
sha
stringlengths
40
40
url
stringlengths
87
315
partition
stringclasses
1 value
summary
stringlengths
4
350
obf_code
stringlengths
7.85k
764k
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/namespacebrowser.py
NamepaceBrowserWidget.configure_namespacebrowser
def configure_namespacebrowser(self): """Configure associated namespace browser widget""" # Update namespace view self.sig_namespace_view.connect(lambda data: self.namespacebrowser.process_remote_view(data)) # Update properties of variables self.sig_var_properties.co...
python
def configure_namespacebrowser(self): """Configure associated namespace browser widget""" # Update namespace view self.sig_namespace_view.connect(lambda data: self.namespacebrowser.process_remote_view(data)) # Update properties of variables self.sig_var_properties.co...
[ "def", "configure_namespacebrowser", "(", "self", ")", ":", "# Update namespace view", "self", ".", "sig_namespace_view", ".", "connect", "(", "lambda", "data", ":", "self", ".", "namespacebrowser", ".", "process_remote_view", "(", "data", ")", ")", "# Update proper...
Configure associated namespace browser widget
[ "Configure", "associated", "namespace", "browser", "widget" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/namespacebrowser.py#L55-L63
train
Configure associated namespace browser widget
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/namespacebrowser.py
NamepaceBrowserWidget.set_namespace_view_settings
def set_namespace_view_settings(self): """Set the namespace view settings""" if self.namespacebrowser: settings = to_text_string( self.namespacebrowser.get_view_settings()) code =(u"get_ipython().kernel.namespace_view_settings = %s" % settings) ...
python
def set_namespace_view_settings(self): """Set the namespace view settings""" if self.namespacebrowser: settings = to_text_string( self.namespacebrowser.get_view_settings()) code =(u"get_ipython().kernel.namespace_view_settings = %s" % settings) ...
[ "def", "set_namespace_view_settings", "(", "self", ")", ":", "if", "self", ".", "namespacebrowser", ":", "settings", "=", "to_text_string", "(", "self", ".", "namespacebrowser", ".", "get_view_settings", "(", ")", ")", "code", "=", "(", "u\"get_ipython().kernel.na...
Set the namespace view settings
[ "Set", "the", "namespace", "view", "settings" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/namespacebrowser.py#L73-L80
train
Set the namespace view settings
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/namespacebrowser.py
NamepaceBrowserWidget.get_value
def get_value(self, name): """Ask kernel for a value""" code = u"get_ipython().kernel.get_value('%s')" % name if self._reading: method = self.kernel_client.input code = u'!' + code else: method = self.silent_execute # Wait until the kernel ret...
python
def get_value(self, name): """Ask kernel for a value""" code = u"get_ipython().kernel.get_value('%s')" % name if self._reading: method = self.kernel_client.input code = u'!' + code else: method = self.silent_execute # Wait until the kernel ret...
[ "def", "get_value", "(", "self", ",", "name", ")", ":", "code", "=", "u\"get_ipython().kernel.get_value('%s')\"", "%", "name", "if", "self", ".", "_reading", ":", "method", "=", "self", ".", "kernel_client", ".", "input", "code", "=", "u'!'", "+", "code", ...
Ask kernel for a value
[ "Ask", "kernel", "for", "a", "value" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/namespacebrowser.py#L82-L108
train
Ask kernel for a value
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/namespacebrowser.py
NamepaceBrowserWidget.set_value
def set_value(self, name, value): """Set value for a variable""" value = to_text_string(value) code = u"get_ipython().kernel.set_value('%s', %s, %s)" % (name, value, PY2) if self._reading: self.kernel_client.i...
python
def set_value(self, name, value): """Set value for a variable""" value = to_text_string(value) code = u"get_ipython().kernel.set_value('%s', %s, %s)" % (name, value, PY2) if self._reading: self.kernel_client.i...
[ "def", "set_value", "(", "self", ",", "name", ",", "value", ")", ":", "value", "=", "to_text_string", "(", "value", ")", "code", "=", "u\"get_ipython().kernel.set_value('%s', %s, %s)\"", "%", "(", "name", ",", "value", ",", "PY2", ")", "if", "self", ".", "...
Set value for a variable
[ "Set", "value", "for", "a", "variable" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/namespacebrowser.py#L110-L119
train
Set value for a variable
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/namespacebrowser.py
NamepaceBrowserWidget.remove_value
def remove_value(self, name): """Remove a variable""" code = u"get_ipython().kernel.remove_value('%s')" % name if self._reading: self.kernel_client.input(u'!' + code) else: self.silent_execute(code)
python
def remove_value(self, name): """Remove a variable""" code = u"get_ipython().kernel.remove_value('%s')" % name if self._reading: self.kernel_client.input(u'!' + code) else: self.silent_execute(code)
[ "def", "remove_value", "(", "self", ",", "name", ")", ":", "code", "=", "u\"get_ipython().kernel.remove_value('%s')\"", "%", "name", "if", "self", ".", "_reading", ":", "self", ".", "kernel_client", ".", "input", "(", "u'!'", "+", "code", ")", "else", ":", ...
Remove a variable
[ "Remove", "a", "variable" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/namespacebrowser.py#L121-L127
train
Remove a variable from the current process.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/namespacebrowser.py
NamepaceBrowserWidget.copy_value
def copy_value(self, orig_name, new_name): """Copy a variable""" code = u"get_ipython().kernel.copy_value('%s', '%s')" % (orig_name, new_name) if self._reading: self.kernel_client.input(u'!' + code) else: ...
python
def copy_value(self, orig_name, new_name): """Copy a variable""" code = u"get_ipython().kernel.copy_value('%s', '%s')" % (orig_name, new_name) if self._reading: self.kernel_client.input(u'!' + code) else: ...
[ "def", "copy_value", "(", "self", ",", "orig_name", ",", "new_name", ")", ":", "code", "=", "u\"get_ipython().kernel.copy_value('%s', '%s')\"", "%", "(", "orig_name", ",", "new_name", ")", "if", "self", ".", "_reading", ":", "self", ".", "kernel_client", ".", ...
Copy a variable
[ "Copy", "a", "variable" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/namespacebrowser.py#L129-L136
train
Copy a variable from the current thread to another thread.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/namespacebrowser.py
NamepaceBrowserWidget._handle_spyder_msg
def _handle_spyder_msg(self, msg): """ Handle internal spyder messages """ spyder_msg_type = msg['content'].get('spyder_msg_type') if spyder_msg_type == 'data': # Deserialize data try: if PY2: value = cloudpickle.loads(m...
python
def _handle_spyder_msg(self, msg): """ Handle internal spyder messages """ spyder_msg_type = msg['content'].get('spyder_msg_type') if spyder_msg_type == 'data': # Deserialize data try: if PY2: value = cloudpickle.loads(m...
[ "def", "_handle_spyder_msg", "(", "self", ",", "msg", ")", ":", "spyder_msg_type", "=", "msg", "[", "'content'", "]", ".", "get", "(", "'spyder_msg_type'", ")", "if", "spyder_msg_type", "==", "'data'", ":", "# Deserialize data", "try", ":", "if", "PY2", ":",...
Handle internal spyder messages
[ "Handle", "internal", "spyder", "messages" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/namespacebrowser.py#L176-L206
train
Handle the spyder messages.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/namespacebrowser.py
NamepaceBrowserWidget._handle_execute_reply
def _handle_execute_reply(self, msg): """ Reimplemented to handle communications between Spyder and the kernel """ msg_id = msg['parent_header']['msg_id'] info = self._request_info['execute'].get(msg_id) # unset reading flag, because if execute finished, raw_input...
python
def _handle_execute_reply(self, msg): """ Reimplemented to handle communications between Spyder and the kernel """ msg_id = msg['parent_header']['msg_id'] info = self._request_info['execute'].get(msg_id) # unset reading flag, because if execute finished, raw_input...
[ "def", "_handle_execute_reply", "(", "self", ",", "msg", ")", ":", "msg_id", "=", "msg", "[", "'parent_header'", "]", "[", "'msg_id'", "]", "info", "=", "self", ".", "_request_info", "[", "'execute'", "]", ".", "get", "(", "msg_id", ")", "# unset reading f...
Reimplemented to handle communications between Spyder and the kernel
[ "Reimplemented", "to", "handle", "communications", "between", "Spyder", "and", "the", "kernel" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/namespacebrowser.py#L209-L234
train
Reimplemented to handle communications between Spyder and kernel kernels and kernel kernels
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/ipythonconsole/widgets/namespacebrowser.py
NamepaceBrowserWidget._handle_status
def _handle_status(self, msg): """ Reimplemented to refresh the namespacebrowser after kernel restarts """ state = msg['content'].get('execution_state', '') msg_type = msg['parent_header'].get('msg_type', '') if state == 'starting': # This is needed to...
python
def _handle_status(self, msg): """ Reimplemented to refresh the namespacebrowser after kernel restarts """ state = msg['content'].get('execution_state', '') msg_type = msg['parent_header'].get('msg_type', '') if state == 'starting': # This is needed to...
[ "def", "_handle_status", "(", "self", ",", "msg", ")", ":", "state", "=", "msg", "[", "'content'", "]", ".", "get", "(", "'execution_state'", ",", "''", ")", "msg_type", "=", "msg", "[", "'parent_header'", "]", ".", "get", "(", "'msg_type'", ",", "''",...
Reimplemented to refresh the namespacebrowser after kernel restarts
[ "Reimplemented", "to", "refresh", "the", "namespacebrowser", "after", "kernel", "restarts" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/namespacebrowser.py#L236-L261
train
Reimplemented to refresh the namespacebrowser after kernel dies
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/base.py
PluginWindow.closeEvent
def closeEvent(self, event): """Reimplement Qt method.""" self.plugin.dockwidget.setWidget(self.plugin) self.plugin.dockwidget.setVisible(True) self.plugin.switch_to_plugin() QMainWindow.closeEvent(self, event) self.plugin.undocked_window = None
python
def closeEvent(self, event): """Reimplement Qt method.""" self.plugin.dockwidget.setWidget(self.plugin) self.plugin.dockwidget.setVisible(True) self.plugin.switch_to_plugin() QMainWindow.closeEvent(self, event) self.plugin.undocked_window = None
[ "def", "closeEvent", "(", "self", ",", "event", ")", ":", "self", ".", "plugin", ".", "dockwidget", ".", "setWidget", "(", "self", ".", "plugin", ")", "self", ".", "plugin", ".", "dockwidget", ".", "setVisible", "(", "True", ")", "self", ".", "plugin",...
Reimplement Qt method.
[ "Reimplement", "Qt", "method", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/base.py#L38-L44
train
Reimplement Qt method.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/base.py
BasePluginMixin.initialize_plugin_in_mainwindow_layout
def initialize_plugin_in_mainwindow_layout(self): """ If this is the first time the plugin is shown, perform actions to initialize plugin position in Spyder's window layout. Use on_first_registration to define the actions to be run by your plugin """ if self.get_...
python
def initialize_plugin_in_mainwindow_layout(self): """ If this is the first time the plugin is shown, perform actions to initialize plugin position in Spyder's window layout. Use on_first_registration to define the actions to be run by your plugin """ if self.get_...
[ "def", "initialize_plugin_in_mainwindow_layout", "(", "self", ")", ":", "if", "self", ".", "get_option", "(", "'first_time'", ",", "True", ")", ":", "try", ":", "self", ".", "on_first_registration", "(", ")", "except", "NotImplementedError", ":", "return", "self...
If this is the first time the plugin is shown, perform actions to initialize plugin position in Spyder's window layout. Use on_first_registration to define the actions to be run by your plugin
[ "If", "this", "is", "the", "first", "time", "the", "plugin", "is", "shown", "perform", "actions", "to", "initialize", "plugin", "position", "in", "Spyder", "s", "window", "layout", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/base.py#L76-L89
train
Initialize plugin position in Spyder s main window layout.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/base.py
BasePluginMixin.update_margins
def update_margins(self): """Update plugin margins""" layout = self.layout() if self.default_margins is None: self.default_margins = layout.getContentsMargins() if CONF.get('main', 'use_custom_margin'): margin = CONF.get('main', 'custom_margin') layout...
python
def update_margins(self): """Update plugin margins""" layout = self.layout() if self.default_margins is None: self.default_margins = layout.getContentsMargins() if CONF.get('main', 'use_custom_margin'): margin = CONF.get('main', 'custom_margin') layout...
[ "def", "update_margins", "(", "self", ")", ":", "layout", "=", "self", ".", "layout", "(", ")", "if", "self", ".", "default_margins", "is", "None", ":", "self", ".", "default_margins", "=", "layout", ".", "getContentsMargins", "(", ")", "if", "CONF", "."...
Update plugin margins
[ "Update", "plugin", "margins" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/base.py#L91-L100
train
Update plugin margins
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/base.py
BasePluginMixin.update_plugin_title
def update_plugin_title(self): """Update plugin title, i.e. dockwidget or window title""" if self.dockwidget is not None: win = self.dockwidget elif self.undocked_window is not None: win = self.undocked_window else: return win.setWindowTitle(se...
python
def update_plugin_title(self): """Update plugin title, i.e. dockwidget or window title""" if self.dockwidget is not None: win = self.dockwidget elif self.undocked_window is not None: win = self.undocked_window else: return win.setWindowTitle(se...
[ "def", "update_plugin_title", "(", "self", ")", ":", "if", "self", ".", "dockwidget", "is", "not", "None", ":", "win", "=", "self", ".", "dockwidget", "elif", "self", ".", "undocked_window", "is", "not", "None", ":", "win", "=", "self", ".", "undocked_wi...
Update plugin title, i.e. dockwidget or window title
[ "Update", "plugin", "title", "i", ".", "e", ".", "dockwidget", "or", "window", "title" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/base.py#L102-L110
train
Update plugin title i. e. dockwidget or window title
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/base.py
BasePluginMixin.create_dockwidget
def create_dockwidget(self): """Add to parent QMainWindow as a dock widget""" # Creating dock widget dock = SpyderDockWidget(self.get_plugin_title(), self.main) # Set properties dock.setObjectName(self.__class__.__name__+"_dw") dock.setAllowedAreas(self.ALLOWED_AREAS) ...
python
def create_dockwidget(self): """Add to parent QMainWindow as a dock widget""" # Creating dock widget dock = SpyderDockWidget(self.get_plugin_title(), self.main) # Set properties dock.setObjectName(self.__class__.__name__+"_dw") dock.setAllowedAreas(self.ALLOWED_AREAS) ...
[ "def", "create_dockwidget", "(", "self", ")", ":", "# Creating dock widget", "dock", "=", "SpyderDockWidget", "(", "self", ".", "get_plugin_title", "(", ")", ",", "self", ".", "main", ")", "# Set properties", "dock", ".", "setObjectName", "(", "self", ".", "__...
Add to parent QMainWindow as a dock widget
[ "Add", "to", "parent", "QMainWindow", "as", "a", "dock", "widget" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/base.py#L112-L131
train
Create a new dock widget and add it to the main window
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/base.py
BasePluginMixin.create_configwidget
def create_configwidget(self, parent): """Create configuration dialog box page widget""" if self.CONFIGWIDGET_CLASS is not None: configwidget = self.CONFIGWIDGET_CLASS(self, parent) configwidget.initialize() return configwidget
python
def create_configwidget(self, parent): """Create configuration dialog box page widget""" if self.CONFIGWIDGET_CLASS is not None: configwidget = self.CONFIGWIDGET_CLASS(self, parent) configwidget.initialize() return configwidget
[ "def", "create_configwidget", "(", "self", ",", "parent", ")", ":", "if", "self", ".", "CONFIGWIDGET_CLASS", "is", "not", "None", ":", "configwidget", "=", "self", ".", "CONFIGWIDGET_CLASS", "(", "self", ",", "parent", ")", "configwidget", ".", "initialize", ...
Create configuration dialog box page widget
[ "Create", "configuration", "dialog", "box", "page", "widget" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/base.py#L133-L138
train
Create a configuration dialog box page widget.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/base.py
BasePluginMixin.get_plugin_font
def get_plugin_font(self, rich_text=False): """ Return plugin font option. All plugins in Spyder use a global font. This is a convenience method in case some plugins will have a delta size based on the default size. """ if rich_text: option = 'rich_font' ...
python
def get_plugin_font(self, rich_text=False): """ Return plugin font option. All plugins in Spyder use a global font. This is a convenience method in case some plugins will have a delta size based on the default size. """ if rich_text: option = 'rich_font' ...
[ "def", "get_plugin_font", "(", "self", ",", "rich_text", "=", "False", ")", ":", "if", "rich_text", ":", "option", "=", "'rich_font'", "font_size_delta", "=", "self", ".", "RICH_FONT_SIZE_DELTA", "else", ":", "option", "=", "'font'", "font_size_delta", "=", "s...
Return plugin font option. All plugins in Spyder use a global font. This is a convenience method in case some plugins will have a delta size based on the default size.
[ "Return", "plugin", "font", "option", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/base.py#L155-L170
train
Get plugin font option.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/base.py
BasePluginMixin.show_message
def show_message(self, message, timeout=0): """Show message in main window's status bar""" self.main.statusBar().showMessage(message, timeout)
python
def show_message(self, message, timeout=0): """Show message in main window's status bar""" self.main.statusBar().showMessage(message, timeout)
[ "def", "show_message", "(", "self", ",", "message", ",", "timeout", "=", "0", ")", ":", "self", ".", "main", ".", "statusBar", "(", ")", ".", "showMessage", "(", "message", ",", "timeout", ")" ]
Show message in main window's status bar
[ "Show", "message", "in", "main", "window", "s", "status", "bar" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/base.py#L183-L185
train
Show message in main window s status bar
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/base.py
BasePluginMixin.create_toggle_view_action
def create_toggle_view_action(self): """Associate a toggle view action with each plugin""" title = self.get_plugin_title() if self.CONF_SECTION == 'editor': title = _('Editor') if self.shortcut is not None: action = create_action(self, title, ...
python
def create_toggle_view_action(self): """Associate a toggle view action with each plugin""" title = self.get_plugin_title() if self.CONF_SECTION == 'editor': title = _('Editor') if self.shortcut is not None: action = create_action(self, title, ...
[ "def", "create_toggle_view_action", "(", "self", ")", ":", "title", "=", "self", ".", "get_plugin_title", "(", ")", "if", "self", ".", "CONF_SECTION", "==", "'editor'", ":", "title", "=", "_", "(", "'Editor'", ")", "if", "self", ".", "shortcut", "is", "n...
Associate a toggle view action with each plugin
[ "Associate", "a", "toggle", "view", "action", "with", "each", "plugin" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/base.py#L187-L200
train
Associate a toggle view action with each plugin
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/base.py
BasePluginMixin.toggle_view
def toggle_view(self, checked): """Toggle view""" if not self.dockwidget: return if checked: self.dockwidget.show() self.dockwidget.raise_() else: self.dockwidget.hide()
python
def toggle_view(self, checked): """Toggle view""" if not self.dockwidget: return if checked: self.dockwidget.show() self.dockwidget.raise_() else: self.dockwidget.hide()
[ "def", "toggle_view", "(", "self", ",", "checked", ")", ":", "if", "not", "self", ".", "dockwidget", ":", "return", "if", "checked", ":", "self", ".", "dockwidget", ".", "show", "(", ")", "self", ".", "dockwidget", ".", "raise_", "(", ")", "else", ":...
Toggle view
[ "Toggle", "view" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/base.py#L202-L210
train
Toggle view of the dockwidget.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/base.py
BasePluginMixin.close_window
def close_window(self): """Close QMainWindow instance that contains this plugin.""" if self.undocked_window is not None: self.undocked_window.close() self.undocked_window = None # Oddly, these actions can appear disabled after the Dock # action is pressed...
python
def close_window(self): """Close QMainWindow instance that contains this plugin.""" if self.undocked_window is not None: self.undocked_window.close() self.undocked_window = None # Oddly, these actions can appear disabled after the Dock # action is pressed...
[ "def", "close_window", "(", "self", ")", ":", "if", "self", ".", "undocked_window", "is", "not", "None", ":", "self", ".", "undocked_window", ".", "close", "(", ")", "self", ".", "undocked_window", "=", "None", "# Oddly, these actions can appear disabled after the...
Close QMainWindow instance that contains this plugin.
[ "Close", "QMainWindow", "instance", "that", "contains", "this", "plugin", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/base.py#L213-L222
train
Close the window that contains this plugin.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/base.py
BasePluginMixin.create_window
def create_window(self): """Create a QMainWindow instance containing this plugin.""" self.undocked_window = window = PluginWindow(self) window.setAttribute(Qt.WA_DeleteOnClose) icon = self.get_plugin_icon() if is_text_string(icon): icon = self.get_icon(icon) w...
python
def create_window(self): """Create a QMainWindow instance containing this plugin.""" self.undocked_window = window = PluginWindow(self) window.setAttribute(Qt.WA_DeleteOnClose) icon = self.get_plugin_icon() if is_text_string(icon): icon = self.get_icon(icon) w...
[ "def", "create_window", "(", "self", ")", ":", "self", ".", "undocked_window", "=", "window", "=", "PluginWindow", "(", "self", ")", "window", ".", "setAttribute", "(", "Qt", ".", "WA_DeleteOnClose", ")", "icon", "=", "self", ".", "get_plugin_icon", "(", "...
Create a QMainWindow instance containing this plugin.
[ "Create", "a", "QMainWindow", "instance", "containing", "this", "plugin", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/base.py#L225-L241
train
Create a QMainWindow instance containing this plugin.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/base.py
BasePluginMixin.on_top_level_changed
def on_top_level_changed(self, top_level): """Actions to perform when a plugin is undocked to be moved.""" if top_level: self.undock_action.setDisabled(True) else: self.undock_action.setDisabled(False)
python
def on_top_level_changed(self, top_level): """Actions to perform when a plugin is undocked to be moved.""" if top_level: self.undock_action.setDisabled(True) else: self.undock_action.setDisabled(False)
[ "def", "on_top_level_changed", "(", "self", ",", "top_level", ")", ":", "if", "top_level", ":", "self", ".", "undock_action", ".", "setDisabled", "(", "True", ")", "else", ":", "self", ".", "undock_action", ".", "setDisabled", "(", "False", ")" ]
Actions to perform when a plugin is undocked to be moved.
[ "Actions", "to", "perform", "when", "a", "plugin", "is", "undocked", "to", "be", "moved", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/base.py#L244-L249
train
Actions to perform when a plugin is undocked to be moved.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/widgets/reporterror.py
DescriptionWidget.cut
def cut(self): """Cut text""" self.truncate_selection(self.header_end_pos) if self.has_selected_text(): CodeEditor.cut(self)
python
def cut(self): """Cut text""" self.truncate_selection(self.header_end_pos) if self.has_selected_text(): CodeEditor.cut(self)
[ "def", "cut", "(", "self", ")", ":", "self", ".", "truncate_selection", "(", "self", ".", "header_end_pos", ")", "if", "self", ".", "has_selected_text", "(", ")", ":", "CodeEditor", ".", "cut", "(", "self", ")" ]
Cut text
[ "Cut", "text" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/widgets/reporterror.py#L76-L80
train
Cut text
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/widgets/reporterror.py
DescriptionWidget.keyPressEvent
def keyPressEvent(self, event): """Reimplemented Qt Method to avoid removing the header.""" event, text, key, ctrl, shift = restore_keyevent(event) cursor_position = self.get_position('cursor') if cursor_position < self.header_end_pos: self.restrict_cursor_position(self.head...
python
def keyPressEvent(self, event): """Reimplemented Qt Method to avoid removing the header.""" event, text, key, ctrl, shift = restore_keyevent(event) cursor_position = self.get_position('cursor') if cursor_position < self.header_end_pos: self.restrict_cursor_position(self.head...
[ "def", "keyPressEvent", "(", "self", ",", "event", ")", ":", "event", ",", "text", ",", "key", ",", "ctrl", ",", "shift", "=", "restore_keyevent", "(", "event", ")", "cursor_position", "=", "self", ".", "get_position", "(", "'cursor'", ")", "if", "cursor...
Reimplemented Qt Method to avoid removing the header.
[ "Reimplemented", "Qt", "Method", "to", "avoid", "removing", "the", "header", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/widgets/reporterror.py#L82-L104
train
Reimplemented Qt Method to avoid removing the header.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/widgets/reporterror.py
SpyderErrorDialog._submit_to_github
def _submit_to_github(self): """Action to take when pressing the submit button.""" # Get reference to the main window if self.parent() is not None: if getattr(self.parent(), 'main', False): # This covers the case when the dialog is attached # to the in...
python
def _submit_to_github(self): """Action to take when pressing the submit button.""" # Get reference to the main window if self.parent() is not None: if getattr(self.parent(), 'main', False): # This covers the case when the dialog is attached # to the in...
[ "def", "_submit_to_github", "(", "self", ")", ":", "# Get reference to the main window", "if", "self", ".", "parent", "(", ")", "is", "not", "None", ":", "if", "getattr", "(", "self", ".", "parent", "(", ")", ",", "'main'", ",", "False", ")", ":", "# Thi...
Action to take when pressing the submit button.
[ "Action", "to", "take", "when", "pressing", "the", "submit", "button", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/widgets/reporterror.py#L250-L305
train
Action to take when the submit button is clicked on the github window.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/widgets/reporterror.py
SpyderErrorDialog._show_details
def _show_details(self): """Show traceback on its own dialog""" if self.details.isVisible(): self.details.hide() self.details_btn.setText(_('Show details')) else: self.resize(570, 700) self.details.document().setPlainText('') self.detai...
python
def _show_details(self): """Show traceback on its own dialog""" if self.details.isVisible(): self.details.hide() self.details_btn.setText(_('Show details')) else: self.resize(570, 700) self.details.document().setPlainText('') self.detai...
[ "def", "_show_details", "(", "self", ")", ":", "if", "self", ".", "details", ".", "isVisible", "(", ")", ":", "self", ".", "details", ".", "hide", "(", ")", "self", ".", "details_btn", ".", "setText", "(", "_", "(", "'Show details'", ")", ")", "else"...
Show traceback on its own dialog
[ "Show", "traceback", "on", "its", "own", "dialog" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/widgets/reporterror.py#L311-L323
train
Show traceback on its own dialog
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/widgets/reporterror.py
SpyderErrorDialog._contents_changed
def _contents_changed(self): """Activate submit_btn.""" desc_chars = (len(self.input_description.toPlainText()) - self.initial_chars) if desc_chars < DESC_MIN_CHARS: self.desc_chars_label.setText( u"{} {}".format(DESC_MIN_CHARS - desc_chars, ...
python
def _contents_changed(self): """Activate submit_btn.""" desc_chars = (len(self.input_description.toPlainText()) - self.initial_chars) if desc_chars < DESC_MIN_CHARS: self.desc_chars_label.setText( u"{} {}".format(DESC_MIN_CHARS - desc_chars, ...
[ "def", "_contents_changed", "(", "self", ")", ":", "desc_chars", "=", "(", "len", "(", "self", ".", "input_description", ".", "toPlainText", "(", ")", ")", "-", "self", ".", "initial_chars", ")", "if", "desc_chars", "<", "DESC_MIN_CHARS", ":", "self", ".",...
Activate submit_btn.
[ "Activate", "submit_btn", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/widgets/reporterror.py#L325-L346
train
Activate submit_btn.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/extensions/closebrackets.py
CloseBracketsExtension.unmatched_brackets_in_line
def unmatched_brackets_in_line(self, text, closing_brackets_type=None): """ Checks if there is an unmatched brackets in the 'text'. The brackets type can be general or specified by closing_brackets_type (')', ']' or '}') """ if closing_brackets_type is None: ...
python
def unmatched_brackets_in_line(self, text, closing_brackets_type=None): """ Checks if there is an unmatched brackets in the 'text'. The brackets type can be general or specified by closing_brackets_type (')', ']' or '}') """ if closing_brackets_type is None: ...
[ "def", "unmatched_brackets_in_line", "(", "self", ",", "text", ",", "closing_brackets_type", "=", "None", ")", ":", "if", "closing_brackets_type", "is", "None", ":", "opening_brackets", "=", "self", ".", "BRACKETS_LEFT", ".", "values", "(", ")", "closing_brackets"...
Checks if there is an unmatched brackets in the 'text'. The brackets type can be general or specified by closing_brackets_type (')', ']' or '}')
[ "Checks", "if", "there", "is", "an", "unmatched", "brackets", "in", "the", "text", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/extensions/closebrackets.py#L44-L71
train
Checks if there is an unmatched brackets in the text.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/extensions/closebrackets.py
CloseBracketsExtension._autoinsert_brackets
def _autoinsert_brackets(self, key): """Control automatic insertation of brackets in various situations.""" char = self.BRACKETS_CHAR[key] pair = self.BRACKETS_PAIR[key] line_text = self.editor.get_text('sol', 'eol') line_to_cursor = self.editor.get_text('sol', 'cursor') ...
python
def _autoinsert_brackets(self, key): """Control automatic insertation of brackets in various situations.""" char = self.BRACKETS_CHAR[key] pair = self.BRACKETS_PAIR[key] line_text = self.editor.get_text('sol', 'eol') line_to_cursor = self.editor.get_text('sol', 'cursor') ...
[ "def", "_autoinsert_brackets", "(", "self", ",", "key", ")", ":", "char", "=", "self", ".", "BRACKETS_CHAR", "[", "key", "]", "pair", "=", "self", ".", "BRACKETS_PAIR", "[", "key", "]", "line_text", "=", "self", ".", "editor", ".", "get_text", "(", "'s...
Control automatic insertation of brackets in various situations.
[ "Control", "automatic", "insertation", "of", "brackets", "in", "various", "situations", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/extensions/closebrackets.py#L73-L114
train
Control automatic insertation of brackets in various situations.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
jrosebr1/imutils
imutils/convenience.py
build_montages
def build_montages(image_list, image_shape, montage_shape): """ --------------------------------------------------------------------------------------------- author: Kyle Hounslow --------------------------------------------------------------------------------------------- Converts a list of single ...
python
def build_montages(image_list, image_shape, montage_shape): """ --------------------------------------------------------------------------------------------- author: Kyle Hounslow --------------------------------------------------------------------------------------------- Converts a list of single ...
[ "def", "build_montages", "(", "image_list", ",", "image_shape", ",", "montage_shape", ")", ":", "if", "len", "(", "image_shape", ")", "!=", "2", ":", "raise", "Exception", "(", "'image shape must be list or tuple of length 2 (rows, cols)'", ")", "if", "len", "(", ...
--------------------------------------------------------------------------------------------- author: Kyle Hounslow --------------------------------------------------------------------------------------------- Converts a list of single images into a list of 'montage' images of specified rows and columns. ...
[ "---------------------------------------------------------------------------------------------", "author", ":", "Kyle", "Hounslow", "---------------------------------------------------------------------------------------------", "Converts", "a", "list", "of", "single", "images", "into", "a...
4430083199793bd66db64e574379cbe18414d420
https://github.com/jrosebr1/imutils/blob/4430083199793bd66db64e574379cbe18414d420/imutils/convenience.py#L238-L301
train
Generates a list of montages of specified size and shape of each image in image_list.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
jrosebr1/imutils
imutils/convenience.py
adjust_brightness_contrast
def adjust_brightness_contrast(image, brightness=0., contrast=0.): """ Adjust the brightness and/or contrast of an image :param image: OpenCV BGR image :param contrast: Float, contrast adjustment with 0 meaning no change :param brightness: Float, brightness adjustment with 0 meaning no change "...
python
def adjust_brightness_contrast(image, brightness=0., contrast=0.): """ Adjust the brightness and/or contrast of an image :param image: OpenCV BGR image :param contrast: Float, contrast adjustment with 0 meaning no change :param brightness: Float, brightness adjustment with 0 meaning no change "...
[ "def", "adjust_brightness_contrast", "(", "image", ",", "brightness", "=", "0.", ",", "contrast", "=", "0.", ")", ":", "beta", "=", "0", "# See the OpenCV docs for more info on the `beta` parameter to addWeighted", "# https://docs.opencv.org/3.4.2/d2/de8/group__core__array.html#g...
Adjust the brightness and/or contrast of an image :param image: OpenCV BGR image :param contrast: Float, contrast adjustment with 0 meaning no change :param brightness: Float, brightness adjustment with 0 meaning no change
[ "Adjust", "the", "brightness", "and", "/", "or", "contrast", "of", "an", "image" ]
4430083199793bd66db64e574379cbe18414d420
https://github.com/jrosebr1/imutils/blob/4430083199793bd66db64e574379cbe18414d420/imutils/convenience.py#L304-L319
train
Adjust the brightness and contrast of an image.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
jrosebr1/imutils
imutils/text.py
put_text
def put_text(img, text, org, font_face, font_scale, color, thickness=1, line_type=8, bottom_left_origin=False): """Utility for drawing text with line breaks :param img: Image. :param text: Text string to be drawn. :param org: Bottom-left corner of the first line of the text string in the image. :pa...
python
def put_text(img, text, org, font_face, font_scale, color, thickness=1, line_type=8, bottom_left_origin=False): """Utility for drawing text with line breaks :param img: Image. :param text: Text string to be drawn. :param org: Bottom-left corner of the first line of the text string in the image. :pa...
[ "def", "put_text", "(", "img", ",", "text", ",", "org", ",", "font_face", ",", "font_scale", ",", "color", ",", "thickness", "=", "1", ",", "line_type", "=", "8", ",", "bottom_left_origin", "=", "False", ")", ":", "# Break out drawing coords", "x", ",", ...
Utility for drawing text with line breaks :param img: Image. :param text: Text string to be drawn. :param org: Bottom-left corner of the first line of the text string in the image. :param font_face: Font type. One of FONT_HERSHEY_SIMPLEX, FONT_HERSHEY_PLAIN, FONT_HERSHEY_DUPLEX, ...
[ "Utility", "for", "drawing", "text", "with", "line", "breaks" ]
4430083199793bd66db64e574379cbe18414d420
https://github.com/jrosebr1/imutils/blob/4430083199793bd66db64e574379cbe18414d420/imutils/text.py#L4-L52
train
Utility for drawing text with line breaks.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
jrosebr1/imutils
imutils/text.py
put_centered_text
def put_centered_text(img, text, font_face, font_scale, color, thickness=1, line_type=8): """Utility for drawing vertically & horizontally centered text with line breaks :param img: Image. :param text: Text string to be drawn. :param font_face: Font type. One of FONT_HERSHEY_SIMPLEX, FONT_HERSHEY_PLAIN...
python
def put_centered_text(img, text, font_face, font_scale, color, thickness=1, line_type=8): """Utility for drawing vertically & horizontally centered text with line breaks :param img: Image. :param text: Text string to be drawn. :param font_face: Font type. One of FONT_HERSHEY_SIMPLEX, FONT_HERSHEY_PLAIN...
[ "def", "put_centered_text", "(", "img", ",", "text", ",", "font_face", ",", "font_scale", ",", "color", ",", "thickness", "=", "1", ",", "line_type", "=", "8", ")", ":", "# Save img dimensions", "img_h", ",", "img_w", "=", "img", ".", "shape", "[", ":", ...
Utility for drawing vertically & horizontally centered text with line breaks :param img: Image. :param text: Text string to be drawn. :param font_face: Font type. One of FONT_HERSHEY_SIMPLEX, FONT_HERSHEY_PLAIN, FONT_HERSHEY_DUPLEX, FONT_HERSHEY_COMPLEX, FONT_HERSHEY_TRIPLEX, FONT...
[ "Utility", "for", "drawing", "vertically", "&", "horizontally", "centered", "text", "with", "line", "breaks" ]
4430083199793bd66db64e574379cbe18414d420
https://github.com/jrosebr1/imutils/blob/4430083199793bd66db64e574379cbe18414d420/imutils/text.py#L55-L107
train
Utility for drawing vertically & horizontally centered text with line breaks.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
jrosebr1/imutils
imutils/feature/helpers.py
corners_to_keypoints
def corners_to_keypoints(corners): """function to take the corners from cv2.GoodFeaturesToTrack and return cv2.KeyPoints""" if corners is None: keypoints = [] else: keypoints = [cv2.KeyPoint(kp[0][0], kp[0][1], 1) for kp in corners] return keypoints
python
def corners_to_keypoints(corners): """function to take the corners from cv2.GoodFeaturesToTrack and return cv2.KeyPoints""" if corners is None: keypoints = [] else: keypoints = [cv2.KeyPoint(kp[0][0], kp[0][1], 1) for kp in corners] return keypoints
[ "def", "corners_to_keypoints", "(", "corners", ")", ":", "if", "corners", "is", "None", ":", "keypoints", "=", "[", "]", "else", ":", "keypoints", "=", "[", "cv2", ".", "KeyPoint", "(", "kp", "[", "0", "]", "[", "0", "]", ",", "kp", "[", "0", "]"...
function to take the corners from cv2.GoodFeaturesToTrack and return cv2.KeyPoints
[ "function", "to", "take", "the", "corners", "from", "cv2", ".", "GoodFeaturesToTrack", "and", "return", "cv2", ".", "KeyPoints" ]
4430083199793bd66db64e574379cbe18414d420
https://github.com/jrosebr1/imutils/blob/4430083199793bd66db64e574379cbe18414d420/imutils/feature/helpers.py#L4-L11
train
function to take the corners from cv2. GoodFeaturesToTrack and return cv2. KeyPoints
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/packages/utils/utils.py
path_to_url
def path_to_url(path): """ Convert a path to a file: URL. The path will be made absolute and have quoted path parts. """ path = os.path.normpath(os.path.abspath(path)) url = urlparse.urljoin("file:", urllib2.pathname2url(path)) return url
python
def path_to_url(path): """ Convert a path to a file: URL. The path will be made absolute and have quoted path parts. """ path = os.path.normpath(os.path.abspath(path)) url = urlparse.urljoin("file:", urllib2.pathname2url(path)) return url
[ "def", "path_to_url", "(", "path", ")", ":", "path", "=", "os", ".", "path", ".", "normpath", "(", "os", ".", "path", ".", "abspath", "(", "path", ")", ")", "url", "=", "urlparse", ".", "urljoin", "(", "\"file:\"", ",", "urllib2", ".", "pathname2url"...
Convert a path to a file: URL. The path will be made absolute and have quoted path parts.
[ "Convert", "a", "path", "to", "a", "file", ":", "URL", ".", "The", "path", "will", "be", "made", "absolute", "and", "have", "quoted", "path", "parts", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/packages/utils/utils.py#L49-L56
train
Convert a path to a file URL.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/packages/utils/utils.py
is_installable_dir
def is_installable_dir(path): """Return True if `path` is a directory containing a setup.py file.""" if not os.path.isdir(path): return False setup_py = os.path.join(path, "setup.py") if os.path.isfile(setup_py): return True return False
python
def is_installable_dir(path): """Return True if `path` is a directory containing a setup.py file.""" if not os.path.isdir(path): return False setup_py = os.path.join(path, "setup.py") if os.path.isfile(setup_py): return True return False
[ "def", "is_installable_dir", "(", "path", ")", ":", "if", "not", "os", ".", "path", ".", "isdir", "(", "path", ")", ":", "return", "False", "setup_py", "=", "os", ".", "path", ".", "join", "(", "path", ",", "\"setup.py\"", ")", "if", "os", ".", "pa...
Return True if `path` is a directory containing a setup.py file.
[ "Return", "True", "if", "path", "is", "a", "directory", "containing", "a", "setup", ".", "py", "file", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/packages/utils/utils.py#L90-L97
train
Return True if path is a directory containing a setup. py file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/config.py
Config.setting
def setting(self, setting_name, default=None): # type: (str) -> Any """ Retrieve a setting value. """ keys = setting_name.split(".") config = self._content for key in keys: if key not in config: return default config = config[key...
python
def setting(self, setting_name, default=None): # type: (str) -> Any """ Retrieve a setting value. """ keys = setting_name.split(".") config = self._content for key in keys: if key not in config: return default config = config[key...
[ "def", "setting", "(", "self", ",", "setting_name", ",", "default", "=", "None", ")", ":", "# type: (str) -> Any", "keys", "=", "setting_name", ".", "split", "(", "\".\"", ")", "config", "=", "self", ".", "_content", "for", "key", "in", "keys", ":", "if"...
Retrieve a setting value.
[ "Retrieve", "a", "setting", "value", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/config.py#L36-L49
train
Retrieve a setting value.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/masonry/api.py
get_requires_for_build_wheel
def get_requires_for_build_wheel(config_settings=None): """ Returns a list of requirements for building, as strings """ poetry = Poetry.create(".") main, _ = SdistBuilder.convert_dependencies(poetry.package, poetry.package.requires) return main
python
def get_requires_for_build_wheel(config_settings=None): """ Returns a list of requirements for building, as strings """ poetry = Poetry.create(".") main, _ = SdistBuilder.convert_dependencies(poetry.package, poetry.package.requires) return main
[ "def", "get_requires_for_build_wheel", "(", "config_settings", "=", "None", ")", ":", "poetry", "=", "Poetry", ".", "create", "(", "\".\"", ")", "main", ",", "_", "=", "SdistBuilder", ".", "convert_dependencies", "(", "poetry", ".", "package", ",", "poetry", ...
Returns a list of requirements for building, as strings
[ "Returns", "a", "list", "of", "requirements", "for", "building", "as", "strings" ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/masonry/api.py#L19-L27
train
Returns a list of requirements for building a wheel.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/masonry/api.py
build_wheel
def build_wheel(wheel_directory, config_settings=None, metadata_directory=None): """Builds a wheel, places it in wheel_directory""" poetry = Poetry.create(".") return unicode( WheelBuilder.make_in( poetry, SystemEnv(Path(sys.prefix)), NullIO(), Path(wheel_directory) ) )
python
def build_wheel(wheel_directory, config_settings=None, metadata_directory=None): """Builds a wheel, places it in wheel_directory""" poetry = Poetry.create(".") return unicode( WheelBuilder.make_in( poetry, SystemEnv(Path(sys.prefix)), NullIO(), Path(wheel_directory) ) )
[ "def", "build_wheel", "(", "wheel_directory", ",", "config_settings", "=", "None", ",", "metadata_directory", "=", "None", ")", ":", "poetry", "=", "Poetry", ".", "create", "(", "\".\"", ")", "return", "unicode", "(", "WheelBuilder", ".", "make_in", "(", "po...
Builds a wheel, places it in wheel_directory
[ "Builds", "a", "wheel", "places", "it", "in", "wheel_directory" ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/masonry/api.py#L54-L62
train
Builds a wheel from a directory.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/masonry/api.py
build_sdist
def build_sdist(sdist_directory, config_settings=None): """Builds an sdist, places it in sdist_directory""" poetry = Poetry.create(".") path = SdistBuilder(poetry, SystemEnv(Path(sys.prefix)), NullIO()).build( Path(sdist_directory) ) return unicode(path.name)
python
def build_sdist(sdist_directory, config_settings=None): """Builds an sdist, places it in sdist_directory""" poetry = Poetry.create(".") path = SdistBuilder(poetry, SystemEnv(Path(sys.prefix)), NullIO()).build( Path(sdist_directory) ) return unicode(path.name)
[ "def", "build_sdist", "(", "sdist_directory", ",", "config_settings", "=", "None", ")", ":", "poetry", "=", "Poetry", ".", "create", "(", "\".\"", ")", "path", "=", "SdistBuilder", "(", "poetry", ",", "SystemEnv", "(", "Path", "(", "sys", ".", "prefix", ...
Builds an sdist, places it in sdist_directory
[ "Builds", "an", "sdist", "places", "it", "in", "sdist_directory" ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/masonry/api.py#L65-L73
train
Builds an sdist and places it in sdist_directory
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/mixology/incompatibility.py
Incompatibility.external_incompatibilities
def external_incompatibilities(self): # type: () -> Generator[Incompatibility] """ Returns all external incompatibilities in this incompatibility's derivation graph. """ if isinstance(self._cause, ConflictCause): cause = self._cause # type: ConflictCause ...
python
def external_incompatibilities(self): # type: () -> Generator[Incompatibility] """ Returns all external incompatibilities in this incompatibility's derivation graph. """ if isinstance(self._cause, ConflictCause): cause = self._cause # type: ConflictCause ...
[ "def", "external_incompatibilities", "(", "self", ")", ":", "# type: () -> Generator[Incompatibility]", "if", "isinstance", "(", "self", ".", "_cause", ",", "ConflictCause", ")", ":", "cause", "=", "self", ".", "_cause", "# type: ConflictCause", "for", "incompatibilit...
Returns all external incompatibilities in this incompatibility's derivation graph.
[ "Returns", "all", "external", "incompatibilities", "in", "this", "incompatibility", "s", "derivation", "graph", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/mixology/incompatibility.py#L88-L101
train
Returns all external incompatibilities in this incompatibility s derivation graph.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/mixology/partial_solution.py
PartialSolution.decide
def decide(self, package): # type: (Package) -> None """ Adds an assignment of package as a decision and increments the decision level. """ # When we make a new decision after backtracking, count an additional # attempted solution. If we backtrack multiple times in a row...
python
def decide(self, package): # type: (Package) -> None """ Adds an assignment of package as a decision and increments the decision level. """ # When we make a new decision after backtracking, count an additional # attempted solution. If we backtrack multiple times in a row...
[ "def", "decide", "(", "self", ",", "package", ")", ":", "# type: (Package) -> None", "# When we make a new decision after backtracking, count an additional", "# attempted solution. If we backtrack multiple times in a row, though, we", "# only want to count one, since we haven't actually starte...
Adds an assignment of package as a decision and increments the decision level.
[ "Adds", "an", "assignment", "of", "package", "as", "a", "decision", "and", "increments", "the", "decision", "level", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/mixology/partial_solution.py#L73-L90
train
Adds an assignment of package as a decision and increments the decision level.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/mixology/partial_solution.py
PartialSolution.derive
def derive( self, dependency, is_positive, cause ): # type: (Dependency, bool, Incompatibility) -> None """ Adds an assignment of package as a derivation. """ self._assign( Assignment.derivation( dependency, is_positive, ...
python
def derive( self, dependency, is_positive, cause ): # type: (Dependency, bool, Incompatibility) -> None """ Adds an assignment of package as a derivation. """ self._assign( Assignment.derivation( dependency, is_positive, ...
[ "def", "derive", "(", "self", ",", "dependency", ",", "is_positive", ",", "cause", ")", ":", "# type: (Dependency, bool, Incompatibility) -> None", "self", ".", "_assign", "(", "Assignment", ".", "derivation", "(", "dependency", ",", "is_positive", ",", "cause", "...
Adds an assignment of package as a derivation.
[ "Adds", "an", "assignment", "of", "package", "as", "a", "derivation", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/mixology/partial_solution.py#L92-L106
train
Adds an assignment of package as a derivation.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/mixology/partial_solution.py
PartialSolution._assign
def _assign(self, assignment): # type: (Assignment) -> None """ Adds an Assignment to _assignments and _positive or _negative. """ self._assignments.append(assignment) self._register(assignment)
python
def _assign(self, assignment): # type: (Assignment) -> None """ Adds an Assignment to _assignments and _positive or _negative. """ self._assignments.append(assignment) self._register(assignment)
[ "def", "_assign", "(", "self", ",", "assignment", ")", ":", "# type: (Assignment) -> None", "self", ".", "_assignments", ".", "append", "(", "assignment", ")", "self", ".", "_register", "(", "assignment", ")" ]
Adds an Assignment to _assignments and _positive or _negative.
[ "Adds", "an", "Assignment", "to", "_assignments", "and", "_positive", "or", "_negative", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/mixology/partial_solution.py#L108-L113
train
Adds an Assignment to _assignments and _positive or _negative.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/mixology/partial_solution.py
PartialSolution.backtrack
def backtrack(self, decision_level): # type: (int) -> None """ Resets the current decision level to decision_level, and removes all assignments made after that level. """ self._backtracking = True packages = set() while self._assignments[-1].decision_level > dec...
python
def backtrack(self, decision_level): # type: (int) -> None """ Resets the current decision level to decision_level, and removes all assignments made after that level. """ self._backtracking = True packages = set() while self._assignments[-1].decision_level > dec...
[ "def", "backtrack", "(", "self", ",", "decision_level", ")", ":", "# type: (int) -> None", "self", ".", "_backtracking", "=", "True", "packages", "=", "set", "(", ")", "while", "self", ".", "_assignments", "[", "-", "1", "]", ".", "decision_level", ">", "d...
Resets the current decision level to decision_level, and removes all assignments made after that level.
[ "Resets", "the", "current", "decision", "level", "to", "decision_level", "and", "removes", "all", "assignments", "made", "after", "that", "level", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/mixology/partial_solution.py#L115-L139
train
Removes all assignments made after the given decision level.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/mixology/partial_solution.py
PartialSolution._register
def _register(self, assignment): # type: (Assignment) -> None """ Registers an Assignment in _positive or _negative. """ name = assignment.dependency.name old_positive = self._positive.get(name) if old_positive is not None: self._positive[name] = old_positive...
python
def _register(self, assignment): # type: (Assignment) -> None """ Registers an Assignment in _positive or _negative. """ name = assignment.dependency.name old_positive = self._positive.get(name) if old_positive is not None: self._positive[name] = old_positive...
[ "def", "_register", "(", "self", ",", "assignment", ")", ":", "# type: (Assignment) -> None", "name", "=", "assignment", ".", "dependency", ".", "name", "old_positive", "=", "self", ".", "_positive", ".", "get", "(", "name", ")", "if", "old_positive", "is", ...
Registers an Assignment in _positive or _negative.
[ "Registers", "an", "Assignment", "in", "_positive", "or", "_negative", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/mixology/partial_solution.py#L141-L169
train
Registers an Assignment in _positive or _negative.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/mixology/partial_solution.py
PartialSolution.satisfier
def satisfier(self, term): # type: (Term) -> Assignment """ Returns the first Assignment in this solution such that the sublist of assignments up to and including that entry collectively satisfies term. """ assigned_term = None # type: Term for assignment in self._assi...
python
def satisfier(self, term): # type: (Term) -> Assignment """ Returns the first Assignment in this solution such that the sublist of assignments up to and including that entry collectively satisfies term. """ assigned_term = None # type: Term for assignment in self._assi...
[ "def", "satisfier", "(", "self", ",", "term", ")", ":", "# type: (Term) -> Assignment", "assigned_term", "=", "None", "# type: Term", "for", "assignment", "in", "self", ".", "_assignments", ":", "if", "assignment", ".", "dependency", ".", "name", "!=", "term", ...
Returns the first Assignment in this solution such that the sublist of assignments up to and including that entry collectively satisfies term.
[ "Returns", "the", "first", "Assignment", "in", "this", "solution", "such", "that", "the", "sublist", "of", "assignments", "up", "to", "and", "including", "that", "entry", "collectively", "satisfies", "term", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/mixology/partial_solution.py#L171-L202
train
Returns the first Assignment that satisfies term.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/poetry.py
Poetry.check
def check(cls, config, strict=False): # type: (dict, bool) -> Dict[str, List[str]] """ Checks the validity of a configuration """ result = {"errors": [], "warnings": []} # Schema validation errors validation_errors = validate_object(config, "poetry-schema") resu...
python
def check(cls, config, strict=False): # type: (dict, bool) -> Dict[str, List[str]] """ Checks the validity of a configuration """ result = {"errors": [], "warnings": []} # Schema validation errors validation_errors = validate_object(config, "poetry-schema") resu...
[ "def", "check", "(", "cls", ",", "config", ",", "strict", "=", "False", ")", ":", "# type: (dict, bool) -> Dict[str, List[str]]", "result", "=", "{", "\"errors\"", ":", "[", "]", ",", "\"warnings\"", ":", "[", "]", "}", "# Schema validation errors", "validation_...
Checks the validity of a configuration
[ "Checks", "the", "validity", "of", "a", "configuration" ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/poetry.py#L220-L265
train
Checks the validity of a configuration object.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/masonry/builders/sdist.py
SdistBuilder.find_packages
def find_packages(self, include): """ Discover subpackages and data. It also retrieves necessary files. """ pkgdir = None if include.source is not None: pkgdir = str(include.base) base = str(include.elements[0].parent) pkg_name = include.pac...
python
def find_packages(self, include): """ Discover subpackages and data. It also retrieves necessary files. """ pkgdir = None if include.source is not None: pkgdir = str(include.base) base = str(include.elements[0].parent) pkg_name = include.pac...
[ "def", "find_packages", "(", "self", ",", "include", ")", ":", "pkgdir", "=", "None", "if", "include", ".", "source", "is", "not", "None", ":", "pkgdir", "=", "str", "(", "include", ".", "base", ")", "base", "=", "str", "(", "include", ".", "elements...
Discover subpackages and data. It also retrieves necessary files.
[ "Discover", "subpackages", "and", "data", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/masonry/builders/sdist.py#L189-L259
train
Find all packages and data.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/masonry/builders/sdist.py
SdistBuilder.clean_tarinfo
def clean_tarinfo(cls, tar_info): """ Clean metadata from a TarInfo object to make it more reproducible. - Set uid & gid to 0 - Set uname and gname to "" - Normalise permissions to 644 or 755 - Set mtime if not None """ ti = copy(tar_info)...
python
def clean_tarinfo(cls, tar_info): """ Clean metadata from a TarInfo object to make it more reproducible. - Set uid & gid to 0 - Set uname and gname to "" - Normalise permissions to 644 or 755 - Set mtime if not None """ ti = copy(tar_info)...
[ "def", "clean_tarinfo", "(", "cls", ",", "tar_info", ")", ":", "ti", "=", "copy", "(", "tar_info", ")", "ti", ".", "uid", "=", "0", "ti", ".", "gid", "=", "0", "ti", ".", "uname", "=", "\"\"", "ti", ".", "gname", "=", "\"\"", "ti", ".", "mode",...
Clean metadata from a TarInfo object to make it more reproducible. - Set uid & gid to 0 - Set uname and gname to "" - Normalise permissions to 644 or 755 - Set mtime if not None
[ "Clean", "metadata", "from", "a", "TarInfo", "object", "to", "make", "it", "more", "reproducible", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/masonry/builders/sdist.py#L321-L337
train
Clean metadata from a TarInfo object to make it more reproducible.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/utils/shell.py
Shell.get
def get(cls): # type: () -> Shell """ Retrieve the current shell. """ if cls._shell is not None: return cls._shell try: name, path = detect_shell(os.getpid()) except (RuntimeError, ShellDetectionFailure): raise RuntimeError("Unable to...
python
def get(cls): # type: () -> Shell """ Retrieve the current shell. """ if cls._shell is not None: return cls._shell try: name, path = detect_shell(os.getpid()) except (RuntimeError, ShellDetectionFailure): raise RuntimeError("Unable to...
[ "def", "get", "(", "cls", ")", ":", "# type: () -> Shell", "if", "cls", ".", "_shell", "is", "not", "None", ":", "return", "cls", ".", "_shell", "try", ":", "name", ",", "path", "=", "detect_shell", "(", "os", ".", "getpid", "(", ")", ")", "except", ...
Retrieve the current shell.
[ "Retrieve", "the", "current", "shell", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/utils/shell.py#L27-L41
train
Returns the current shell.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/puzzle/provider.py
Provider.search_for
def search_for(self, dependency): # type: (Dependency) -> List[Package] """ Search for the specifications that match the given dependency. The specifications in the returned list will be considered in reverse order, so the latest version ought to be last. """ if depende...
python
def search_for(self, dependency): # type: (Dependency) -> List[Package] """ Search for the specifications that match the given dependency. The specifications in the returned list will be considered in reverse order, so the latest version ought to be last. """ if depende...
[ "def", "search_for", "(", "self", ",", "dependency", ")", ":", "# type: (Dependency) -> List[Package]", "if", "dependency", ".", "is_root", ":", "return", "PackageCollection", "(", "dependency", ",", "[", "self", ".", "_package", "]", ")", "for", "constraint", "...
Search for the specifications that match the given dependency. The specifications in the returned list will be considered in reverse order, so the latest version ought to be last.
[ "Search", "for", "the", "specifications", "that", "match", "the", "given", "dependency", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/puzzle/provider.py#L100-L158
train
Search for the specifications that match the given dependency.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/puzzle/provider.py
Provider.search_for_vcs
def search_for_vcs(self, dependency): # type: (VCSDependency) -> List[Package] """ Search for the specifications that match the given VCS dependency. Basically, we clone the repository in a temporary directory and get the information we need by checking out the specified reference. ...
python
def search_for_vcs(self, dependency): # type: (VCSDependency) -> List[Package] """ Search for the specifications that match the given VCS dependency. Basically, we clone the repository in a temporary directory and get the information we need by checking out the specified reference. ...
[ "def", "search_for_vcs", "(", "self", ",", "dependency", ")", ":", "# type: (VCSDependency) -> List[Package]", "if", "dependency", ".", "vcs", "!=", "\"git\"", ":", "raise", "ValueError", "(", "\"Unsupported VCS dependency {}\"", ".", "format", "(", "dependency", ".",...
Search for the specifications that match the given VCS dependency. Basically, we clone the repository in a temporary directory and get the information we need by checking out the specified reference.
[ "Search", "for", "the", "specifications", "that", "match", "the", "given", "VCS", "dependency", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/puzzle/provider.py#L160-L200
train
Search for the specifications that match the given VCS dependency.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/puzzle/provider.py
Provider.incompatibilities_for
def incompatibilities_for( self, package ): # type: (DependencyPackage) -> List[Incompatibility] """ Returns incompatibilities that encapsulate a given package's dependencies, or that it can't be safely selected. If multiple subsequent versions of this package have the same...
python
def incompatibilities_for( self, package ): # type: (DependencyPackage) -> List[Incompatibility] """ Returns incompatibilities that encapsulate a given package's dependencies, or that it can't be safely selected. If multiple subsequent versions of this package have the same...
[ "def", "incompatibilities_for", "(", "self", ",", "package", ")", ":", "# type: (DependencyPackage) -> List[Incompatibility]", "if", "package", ".", "is_root", "(", ")", ":", "dependencies", "=", "package", ".", "all_requires", "else", ":", "dependencies", "=", "pac...
Returns incompatibilities that encapsulate a given package's dependencies, or that it can't be safely selected. If multiple subsequent versions of this package have the same dependencies, this will return incompatibilities that reflect that. It won't return incompatibilities that have a...
[ "Returns", "incompatibilities", "that", "encapsulate", "a", "given", "package", "s", "dependencies", "or", "that", "it", "can", "t", "be", "safely", "selected", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/puzzle/provider.py#L393-L449
train
Returns incompatibilities that encapsulate a given package s dependencies and that it can t be safely selected.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/mixology/version_solver.py
VersionSolver.solve
def solve(self): # type: () -> SolverResult """ Finds a set of dependencies that match the root package's constraints, or raises an error if no such set is available. """ start = time.time() root_dependency = Dependency(self._root.name, self._root.version) root_d...
python
def solve(self): # type: () -> SolverResult """ Finds a set of dependencies that match the root package's constraints, or raises an error if no such set is available. """ start = time.time() root_dependency = Dependency(self._root.name, self._root.version) root_d...
[ "def", "solve", "(", "self", ")", ":", "# type: () -> SolverResult", "start", "=", "time", ".", "time", "(", ")", "root_dependency", "=", "Dependency", "(", "self", ".", "_root", ".", "name", ",", "self", ".", "_root", ".", "version", ")", "root_dependency...
Finds a set of dependencies that match the root package's constraints, or raises an error if no such set is available.
[ "Finds", "a", "set", "of", "dependencies", "that", "match", "the", "root", "package", "s", "constraints", "or", "raises", "an", "error", "if", "no", "such", "set", "is", "available", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/mixology/version_solver.py#L62-L90
train
Solve the version of the root package.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/mixology/version_solver.py
VersionSolver._propagate
def _propagate(self, package): # type: (str) -> None """ Performs unit propagation on incompatibilities transitively related to package to derive new assignments for _solution. """ changed = set() changed.add(package) while changed: package = changed...
python
def _propagate(self, package): # type: (str) -> None """ Performs unit propagation on incompatibilities transitively related to package to derive new assignments for _solution. """ changed = set() changed.add(package) while changed: package = changed...
[ "def", "_propagate", "(", "self", ",", "package", ")", ":", "# type: (str) -> None", "changed", "=", "set", "(", ")", "changed", ".", "add", "(", "package", ")", "while", "changed", ":", "package", "=", "changed", ".", "pop", "(", ")", "# Iterate in revers...
Performs unit propagation on incompatibilities transitively related to package to derive new assignments for _solution.
[ "Performs", "unit", "propagation", "on", "incompatibilities", "transitively", "related", "to", "package", "to", "derive", "new", "assignments", "for", "_solution", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/mixology/version_solver.py#L92-L127
train
Performs unit propagation on incompatibilities transitively related to package and returns None.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/mixology/version_solver.py
VersionSolver._propagate_incompatibility
def _propagate_incompatibility( self, incompatibility ): # type: (Incompatibility) -> Union[str, _conflict, None] """ If incompatibility is almost satisfied by _solution, adds the negation of the unsatisfied term to _solution. If incompatibility is satisfied by _solution, r...
python
def _propagate_incompatibility( self, incompatibility ): # type: (Incompatibility) -> Union[str, _conflict, None] """ If incompatibility is almost satisfied by _solution, adds the negation of the unsatisfied term to _solution. If incompatibility is satisfied by _solution, r...
[ "def", "_propagate_incompatibility", "(", "self", ",", "incompatibility", ")", ":", "# type: (Incompatibility) -> Union[str, _conflict, None]", "# The first entry in incompatibility.terms that's not yet satisfied by", "# _solution, if one exists. If we find more than one, _solution is", "# inc...
If incompatibility is almost satisfied by _solution, adds the negation of the unsatisfied term to _solution. If incompatibility is satisfied by _solution, returns _conflict. If incompatibility is almost satisfied by _solution, returns the unsatisfied term's package name. Otherw...
[ "If", "incompatibility", "is", "almost", "satisfied", "by", "_solution", "adds", "the", "negation", "of", "the", "unsatisfied", "term", "to", "_solution", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/mixology/version_solver.py#L129-L181
train
Propagate an incompatibility to the _solution.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/mixology/version_solver.py
VersionSolver._resolve_conflict
def _resolve_conflict( self, incompatibility ): # type: (Incompatibility) -> Incompatibility """ Given an incompatibility that's satisfied by _solution, The `conflict resolution`_ constructs a new incompatibility that encapsulates the root cause of the conflict and backtrack...
python
def _resolve_conflict( self, incompatibility ): # type: (Incompatibility) -> Incompatibility """ Given an incompatibility that's satisfied by _solution, The `conflict resolution`_ constructs a new incompatibility that encapsulates the root cause of the conflict and backtrack...
[ "def", "_resolve_conflict", "(", "self", ",", "incompatibility", ")", ":", "# type: (Incompatibility) -> Incompatibility", "self", ".", "_log", "(", "\"conflict: {}\"", ".", "format", "(", "incompatibility", ")", ")", "new_incompatibility", "=", "False", "while", "not...
Given an incompatibility that's satisfied by _solution, The `conflict resolution`_ constructs a new incompatibility that encapsulates the root cause of the conflict and backtracks _solution until the new incompatibility will allow _propagate() to deduce new assignments. Adds the new inc...
[ "Given", "an", "incompatibility", "that", "s", "satisfied", "by", "_solution", "The", "conflict", "resolution", "_", "constructs", "a", "new", "incompatibility", "that", "encapsulates", "the", "root", "cause", "of", "the", "conflict", "and", "backtracks", "_soluti...
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/mixology/version_solver.py#L183-L316
train
Resolves a conflict incompatibility with the incompatibility that is not satisfied by _solution.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/mixology/version_solver.py
VersionSolver._choose_package_version
def _choose_package_version(self): # type: () -> Union[str, None] """ Tries to select a version of a required package. Returns the name of the package whose incompatibilities should be propagated by _propagate(), or None indicating that version solving is complete and a solutio...
python
def _choose_package_version(self): # type: () -> Union[str, None] """ Tries to select a version of a required package. Returns the name of the package whose incompatibilities should be propagated by _propagate(), or None indicating that version solving is complete and a solutio...
[ "def", "_choose_package_version", "(", "self", ")", ":", "# type: () -> Union[str, None]", "unsatisfied", "=", "self", ".", "_solution", ".", "unsatisfied", "if", "not", "unsatisfied", ":", "return", "# Prefer packages with as few remaining versions as possible,", "# so that ...
Tries to select a version of a required package. Returns the name of the package whose incompatibilities should be propagated by _propagate(), or None indicating that version solving is complete and a solution has been found.
[ "Tries", "to", "select", "a", "version", "of", "a", "required", "package", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/mixology/version_solver.py#L318-L402
train
Tries to select a version of a required package. Returns None if no version is required.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/mixology/version_solver.py
VersionSolver._result
def _result(self): # type: () -> SolverResult """ Creates a #SolverResult from the decisions in _solution """ decisions = self._solution.decisions return SolverResult( self._root, [p for p in decisions if not p.is_root()], self._solution.atte...
python
def _result(self): # type: () -> SolverResult """ Creates a #SolverResult from the decisions in _solution """ decisions = self._solution.decisions return SolverResult( self._root, [p for p in decisions if not p.is_root()], self._solution.atte...
[ "def", "_result", "(", "self", ")", ":", "# type: () -> SolverResult", "decisions", "=", "self", ".", "_solution", ".", "decisions", "return", "SolverResult", "(", "self", ".", "_root", ",", "[", "p", "for", "p", "in", "decisions", "if", "not", "p", ".", ...
Creates a #SolverResult from the decisions in _solution
[ "Creates", "a", "#SolverResult", "from", "the", "decisions", "in", "_solution" ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/mixology/version_solver.py#L407-L417
train
Creates a SolverResult from the _solution and the _root.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/utils/env.py
Env.run
def run(self, bin, *args, **kwargs): """ Run a command inside the Python environment. """ bin = self._bin(bin) cmd = [bin] + list(args) shell = kwargs.get("shell", False) call = kwargs.pop("call", False) input_ = kwargs.pop("input_", None) if she...
python
def run(self, bin, *args, **kwargs): """ Run a command inside the Python environment. """ bin = self._bin(bin) cmd = [bin] + list(args) shell = kwargs.get("shell", False) call = kwargs.pop("call", False) input_ = kwargs.pop("input_", None) if she...
[ "def", "run", "(", "self", ",", "bin", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "bin", "=", "self", ".", "_bin", "(", "bin", ")", "cmd", "=", "[", "bin", "]", "+", "list", "(", "args", ")", "shell", "=", "kwargs", ".", "get", "(...
Run a command inside the Python environment.
[ "Run", "a", "command", "inside", "the", "Python", "environment", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/utils/env.py#L345-L381
train
Run a command inside the Python environment.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/utils/env.py
Env._bin
def _bin(self, bin): # type: (str) -> str """ Return path to the given executable. """ bin_path = (self._bin_dir / bin).with_suffix(".exe" if self._is_windows else "") if not bin_path.exists(): return bin return str(bin_path)
python
def _bin(self, bin): # type: (str) -> str """ Return path to the given executable. """ bin_path = (self._bin_dir / bin).with_suffix(".exe" if self._is_windows else "") if not bin_path.exists(): return bin return str(bin_path)
[ "def", "_bin", "(", "self", ",", "bin", ")", ":", "# type: (str) -> str", "bin_path", "=", "(", "self", ".", "_bin_dir", "/", "bin", ")", ".", "with_suffix", "(", "\".exe\"", "if", "self", ".", "_is_windows", "else", "\"\"", ")", "if", "not", "bin_path",...
Return path to the given executable.
[ "Return", "path", "to", "the", "given", "executable", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/utils/env.py#L391-L399
train
Return the path to the given executable.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/version/helpers.py
format_python_constraint
def format_python_constraint(constraint): """ This helper will help in transforming disjunctive constraint into proper constraint. """ if isinstance(constraint, Version): if constraint.precision >= 3: return "=={}".format(str(constraint)) # Transform 3.6 or 3 if ...
python
def format_python_constraint(constraint): """ This helper will help in transforming disjunctive constraint into proper constraint. """ if isinstance(constraint, Version): if constraint.precision >= 3: return "=={}".format(str(constraint)) # Transform 3.6 or 3 if ...
[ "def", "format_python_constraint", "(", "constraint", ")", ":", "if", "isinstance", "(", "constraint", ",", "Version", ")", ":", "if", "constraint", ".", "precision", ">=", "3", ":", "return", "\"=={}\"", ".", "format", "(", "str", "(", "constraint", ")", ...
This helper will help in transforming disjunctive constraint into proper constraint.
[ "This", "helper", "will", "help", "in", "transforming", "disjunctive", "constraint", "into", "proper", "constraint", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/version/helpers.py#L19-L56
train
This helper will help in transforming a disjunctive constraint into proper constraint.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/masonry/utils/tags.py
get_abbr_impl
def get_abbr_impl(env): """Return abbreviated implementation name.""" impl = env.python_implementation if impl == "PyPy": return "pp" elif impl == "Jython": return "jy" elif impl == "IronPython": return "ip" elif impl == "CPython": return "cp" raise LookupEr...
python
def get_abbr_impl(env): """Return abbreviated implementation name.""" impl = env.python_implementation if impl == "PyPy": return "pp" elif impl == "Jython": return "jy" elif impl == "IronPython": return "ip" elif impl == "CPython": return "cp" raise LookupEr...
[ "def", "get_abbr_impl", "(", "env", ")", ":", "impl", "=", "env", ".", "python_implementation", "if", "impl", "==", "\"PyPy\"", ":", "return", "\"pp\"", "elif", "impl", "==", "\"Jython\"", ":", "return", "\"jy\"", "elif", "impl", "==", "\"IronPython\"", ":",...
Return abbreviated implementation name.
[ "Return", "abbreviated", "implementation", "name", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/masonry/utils/tags.py#L15-L28
train
Return abbreviated implementation name.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/masonry/utils/tags.py
get_impl_ver
def get_impl_ver(env): """Return implementation version.""" impl_ver = env.config_var("py_version_nodot") if not impl_ver or get_abbr_impl(env) == "pp": impl_ver = "".join(map(str, get_impl_version_info(env))) return impl_ver
python
def get_impl_ver(env): """Return implementation version.""" impl_ver = env.config_var("py_version_nodot") if not impl_ver or get_abbr_impl(env) == "pp": impl_ver = "".join(map(str, get_impl_version_info(env))) return impl_ver
[ "def", "get_impl_ver", "(", "env", ")", ":", "impl_ver", "=", "env", ".", "config_var", "(", "\"py_version_nodot\"", ")", "if", "not", "impl_ver", "or", "get_abbr_impl", "(", "env", ")", "==", "\"pp\"", ":", "impl_ver", "=", "\"\"", ".", "join", "(", "ma...
Return implementation version.
[ "Return", "implementation", "version", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/masonry/utils/tags.py#L31-L37
train
Return implementation version.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/masonry/utils/tags.py
get_flag
def get_flag(env, var, fallback, expected=True, warn=True): """Use a fallback method for determining SOABI flags if the needed config var is unset or unavailable.""" val = env.config_var(var) if val is None: if warn: warnings.warn( "Config variable '{0}' is unset, Pyt...
python
def get_flag(env, var, fallback, expected=True, warn=True): """Use a fallback method for determining SOABI flags if the needed config var is unset or unavailable.""" val = env.config_var(var) if val is None: if warn: warnings.warn( "Config variable '{0}' is unset, Pyt...
[ "def", "get_flag", "(", "env", ",", "var", ",", "fallback", ",", "expected", "=", "True", ",", "warn", "=", "True", ")", ":", "val", "=", "env", ".", "config_var", "(", "var", ")", "if", "val", "is", "None", ":", "if", "warn", ":", "warnings", "....
Use a fallback method for determining SOABI flags if the needed config var is unset or unavailable.
[ "Use", "a", "fallback", "method", "for", "determining", "SOABI", "flags", "if", "the", "needed", "config", "var", "is", "unset", "or", "unavailable", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/masonry/utils/tags.py#L50-L63
train
Get the SOABI flag if the needed config variable is unset or unavailable.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/packages/dependency.py
Dependency.accepts
def accepts(self, package): # type: (poetry.packages.Package) -> bool """ Determines if the given package matches this dependency. """ return ( self._name == package.name and self._constraint.allows(package.version) and (not package.is_prerelease() or...
python
def accepts(self, package): # type: (poetry.packages.Package) -> bool """ Determines if the given package matches this dependency. """ return ( self._name == package.name and self._constraint.allows(package.version) and (not package.is_prerelease() or...
[ "def", "accepts", "(", "self", ",", "package", ")", ":", "# type: (poetry.packages.Package) -> bool", "return", "(", "self", ".", "_name", "==", "package", ".", "name", "and", "self", ".", "_constraint", ".", "allows", "(", "package", ".", "version", ")", "a...
Determines if the given package matches this dependency.
[ "Determines", "if", "the", "given", "package", "matches", "this", "dependency", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/packages/dependency.py#L166-L174
train
Determines if the given package matches this dependency.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/packages/dependency.py
Dependency.deactivate
def deactivate(self): """ Set the dependency as optional. """ if not self._optional: self._optional = True self._activated = False
python
def deactivate(self): """ Set the dependency as optional. """ if not self._optional: self._optional = True self._activated = False
[ "def", "deactivate", "(", "self", ")", ":", "if", "not", "self", ".", "_optional", ":", "self", ".", "_optional", "=", "True", "self", ".", "_activated", "=", "False" ]
Set the dependency as optional.
[ "Set", "the", "dependency", "as", "optional", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/packages/dependency.py#L282-L289
train
Deactivate the dependency.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
get-poetry.py
Installer.install
def install(self, version, upgrade=False): """ Installs Poetry in $POETRY_HOME. """ print("Installing version: " + colorize("info", version)) self.make_lib(version) self.make_bin() self.make_env() self.update_path() return 0
python
def install(self, version, upgrade=False): """ Installs Poetry in $POETRY_HOME. """ print("Installing version: " + colorize("info", version)) self.make_lib(version) self.make_bin() self.make_env() self.update_path() return 0
[ "def", "install", "(", "self", ",", "version", ",", "upgrade", "=", "False", ")", ":", "print", "(", "\"Installing version: \"", "+", "colorize", "(", "\"info\"", ",", "version", ")", ")", "self", ".", "make_lib", "(", "version", ")", "self", ".", "make_...
Installs Poetry in $POETRY_HOME.
[ "Installs", "Poetry", "in", "$POETRY_HOME", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/get-poetry.py#L453-L464
train
Installs Poetry in the current directory.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
get-poetry.py
Installer.make_lib
def make_lib(self, version): """ Packs everything into a single lib/ directory. """ if os.path.exists(POETRY_LIB_BACKUP): shutil.rmtree(POETRY_LIB_BACKUP) # Backup the current installation if os.path.exists(POETRY_LIB): shutil.copytree(POETRY_LIB,...
python
def make_lib(self, version): """ Packs everything into a single lib/ directory. """ if os.path.exists(POETRY_LIB_BACKUP): shutil.rmtree(POETRY_LIB_BACKUP) # Backup the current installation if os.path.exists(POETRY_LIB): shutil.copytree(POETRY_LIB,...
[ "def", "make_lib", "(", "self", ",", "version", ")", ":", "if", "os", ".", "path", ".", "exists", "(", "POETRY_LIB_BACKUP", ")", ":", "shutil", ".", "rmtree", "(", "POETRY_LIB_BACKUP", ")", "# Backup the current installation", "if", "os", ".", "path", ".", ...
Packs everything into a single lib/ directory.
[ "Packs", "everything", "into", "a", "single", "lib", "/", "directory", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/get-poetry.py#L466-L490
train
Packs everything into a single lib directory.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
get-poetry.py
Installer.update_path
def update_path(self): """ Tries to update the $PATH automatically. """ if WINDOWS: return self.add_to_windows_path() # Updating any profile we can on UNIX systems export_string = self.get_export_string() addition = "\n{}\n".format(export_string) ...
python
def update_path(self): """ Tries to update the $PATH automatically. """ if WINDOWS: return self.add_to_windows_path() # Updating any profile we can on UNIX systems export_string = self.get_export_string() addition = "\n{}\n".format(export_string) ...
[ "def", "update_path", "(", "self", ")", ":", "if", "WINDOWS", ":", "return", "self", ".", "add_to_windows_path", "(", ")", "# Updating any profile we can on UNIX systems", "export_string", "=", "self", ".", "get_export_string", "(", ")", "addition", "=", "\"\\n{}\\n...
Tries to update the $PATH automatically.
[ "Tries", "to", "update", "the", "$PATH", "automatically", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/get-poetry.py#L588-L613
train
Update the path of the local cache file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/mixology/term.py
Term.satisfies
def satisfies(self, other): # type: (Term) -> bool """ Returns whether this term satisfies another. """ return ( self.dependency.name == other.dependency.name and self.relation(other) == SetRelation.SUBSET )
python
def satisfies(self, other): # type: (Term) -> bool """ Returns whether this term satisfies another. """ return ( self.dependency.name == other.dependency.name and self.relation(other) == SetRelation.SUBSET )
[ "def", "satisfies", "(", "self", ",", "other", ")", ":", "# type: (Term) -> bool", "return", "(", "self", ".", "dependency", ".", "name", "==", "other", ".", "dependency", ".", "name", "and", "self", ".", "relation", "(", "other", ")", "==", "SetRelation",...
Returns whether this term satisfies another.
[ "Returns", "whether", "this", "term", "satisfies", "another", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/mixology/term.py#L36-L43
train
Returns whether this term satisfies another.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/mixology/term.py
Term.relation
def relation(self, other): # type: (Term) -> int """ Returns the relationship between the package versions allowed by this term and another. """ if self.dependency.name != other.dependency.name: raise ValueError( "{} should refer to {}".format(other, ...
python
def relation(self, other): # type: (Term) -> int """ Returns the relationship between the package versions allowed by this term and another. """ if self.dependency.name != other.dependency.name: raise ValueError( "{} should refer to {}".format(other, ...
[ "def", "relation", "(", "self", ",", "other", ")", ":", "# type: (Term) -> int", "if", "self", ".", "dependency", ".", "name", "!=", "other", ".", "dependency", ".", "name", ":", "raise", "ValueError", "(", "\"{} should refer to {}\"", ".", "format", "(", "o...
Returns the relationship between the package versions allowed by this term and another.
[ "Returns", "the", "relationship", "between", "the", "package", "versions", "allowed", "by", "this", "term", "and", "another", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/mixology/term.py#L45-L107
train
Returns the relationship between the package versions of this term and another.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/mixology/term.py
Term.intersect
def intersect(self, other): # type: (Term) -> Union[Term, None] """ Returns a Term that represents the packages allowed by both this term and another """ if self.dependency.name != other.dependency.name: raise ValueError( "{} should refer to {}".forma...
python
def intersect(self, other): # type: (Term) -> Union[Term, None] """ Returns a Term that represents the packages allowed by both this term and another """ if self.dependency.name != other.dependency.name: raise ValueError( "{} should refer to {}".forma...
[ "def", "intersect", "(", "self", ",", "other", ")", ":", "# type: (Term) -> Union[Term, None]", "if", "self", ".", "dependency", ".", "name", "!=", "other", ".", "dependency", ".", "name", ":", "raise", "ValueError", "(", "\"{} should refer to {}\"", ".", "forma...
Returns a Term that represents the packages allowed by both this term and another
[ "Returns", "a", "Term", "that", "represents", "the", "packages", "allowed", "by", "both", "this", "term", "and", "another" ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/mixology/term.py#L109-L141
train
Returns a Term that represents the packages allowed by both this and other.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/masonry/builders/builder.py
Builder.find_files_to_add
def find_files_to_add(self, exclude_build=True): # type: (bool) -> list """ Finds all files to add to the tarball """ to_add = [] for include in self._module.includes: for file in include.elements: if "__pycache__" in str(file): c...
python
def find_files_to_add(self, exclude_build=True): # type: (bool) -> list """ Finds all files to add to the tarball """ to_add = [] for include in self._module.includes: for file in include.elements: if "__pycache__" in str(file): c...
[ "def", "find_files_to_add", "(", "self", ",", "exclude_build", "=", "True", ")", ":", "# type: (bool) -> list", "to_add", "=", "[", "]", "for", "include", "in", "self", ".", "_module", ".", "includes", ":", "for", "file", "in", "include", ".", "elements", ...
Finds all files to add to the tarball
[ "Finds", "all", "files", "to", "add", "to", "the", "tarball" ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/masonry/builders/builder.py#L89-L156
train
Finds all files to add to the tarball.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/version/__init__.py
parse
def parse( version, strict=False # type: str # type: bool ): # type:(...) -> Union[Version, LegacyVersion] """ Parse the given version string and return either a :class:`Version` object or a LegacyVersion object depending on if the given version is a valid PEP 440 version or a legacy version. ...
python
def parse( version, strict=False # type: str # type: bool ): # type:(...) -> Union[Version, LegacyVersion] """ Parse the given version string and return either a :class:`Version` object or a LegacyVersion object depending on if the given version is a valid PEP 440 version or a legacy version. ...
[ "def", "parse", "(", "version", ",", "strict", "=", "False", "# type: str # type: bool", ")", ":", "# type:(...) -> Union[Version, LegacyVersion]", "try", ":", "return", "Version", "(", "version", ")", "except", "InvalidVersion", ":", "if", "strict", ":", "raise", ...
Parse the given version string and return either a :class:`Version` object or a LegacyVersion object depending on if the given version is a valid PEP 440 version or a legacy version. If strict=True only PEP 440 versions will be accepted.
[ "Parse", "the", "given", "version", "string", "and", "return", "either", "a", ":", "class", ":", "Version", "object", "or", "a", "LegacyVersion", "object", "depending", "on", "if", "the", "given", "version", "is", "a", "valid", "PEP", "440", "version", "or...
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/version/__init__.py#L28-L44
train
Parses the given version string and returns either a Version object or LegacyVersion object depending on if the given version string is a PEP 440 version or a LegacyVersion object depending on if the given version string is a PEP 440 version.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/packages/locker.py
Locker.is_fresh
def is_fresh(self): # type: () -> bool """ Checks whether the lock file is still up to date with the current hash. """ lock = self._lock.read() metadata = lock.get("metadata", {}) if "content-hash" in metadata: return self._content_hash == lock["metadata"]["...
python
def is_fresh(self): # type: () -> bool """ Checks whether the lock file is still up to date with the current hash. """ lock = self._lock.read() metadata = lock.get("metadata", {}) if "content-hash" in metadata: return self._content_hash == lock["metadata"]["...
[ "def", "is_fresh", "(", "self", ")", ":", "# type: () -> bool", "lock", "=", "self", ".", "_lock", ".", "read", "(", ")", "metadata", "=", "lock", ".", "get", "(", "\"metadata\"", ",", "{", "}", ")", "if", "\"content-hash\"", "in", "metadata", ":", "re...
Checks whether the lock file is still up to date with the current hash.
[ "Checks", "whether", "the", "lock", "file", "is", "still", "up", "to", "date", "with", "the", "current", "hash", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/packages/locker.py#L45-L55
train
Checks whether the lock file is still up to date with the current hash.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/packages/locker.py
Locker.locked_repository
def locked_repository( self, with_dev_reqs=False ): # type: (bool) -> poetry.repositories.Repository """ Searches and returns a repository of locked packages. """ if not self.is_locked(): return poetry.repositories.Repository() lock_data = self.lock_data...
python
def locked_repository( self, with_dev_reqs=False ): # type: (bool) -> poetry.repositories.Repository """ Searches and returns a repository of locked packages. """ if not self.is_locked(): return poetry.repositories.Repository() lock_data = self.lock_data...
[ "def", "locked_repository", "(", "self", ",", "with_dev_reqs", "=", "False", ")", ":", "# type: (bool) -> poetry.repositories.Repository", "if", "not", "self", ".", "is_locked", "(", ")", ":", "return", "poetry", ".", "repositories", ".", "Repository", "(", ")", ...
Searches and returns a repository of locked packages.
[ "Searches", "and", "returns", "a", "repository", "of", "locked", "packages", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/packages/locker.py#L57-L121
train
Returns a repository of locked packages.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/packages/locker.py
Locker._get_content_hash
def _get_content_hash(self): # type: () -> str """ Returns the sha256 hash of the sorted content of the pyproject file. """ content = self._local_config relevant_content = {} for key in self._relevant_keys: relevant_content[key] = content.get(key) c...
python
def _get_content_hash(self): # type: () -> str """ Returns the sha256 hash of the sorted content of the pyproject file. """ content = self._local_config relevant_content = {} for key in self._relevant_keys: relevant_content[key] = content.get(key) c...
[ "def", "_get_content_hash", "(", "self", ")", ":", "# type: () -> str", "content", "=", "self", ".", "_local_config", "relevant_content", "=", "{", "}", "for", "key", "in", "self", ".", "_relevant_keys", ":", "relevant_content", "[", "key", "]", "=", "content"...
Returns the sha256 hash of the sorted content of the pyproject file.
[ "Returns", "the", "sha256", "hash", "of", "the", "sorted", "content", "of", "the", "pyproject", "file", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/packages/locker.py#L165-L179
train
Returns the sha256 hash of the sorted content of the pyproject file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/repositories/installed_repository.py
InstalledRepository.load
def load(cls, env): # type: (Env) -> InstalledRepository """ Load installed packages. For now, it uses the pip "freeze" command. """ repo = cls() freeze_output = env.run("pip", "freeze") for line in freeze_output.split("\n"): if "==" in line: ...
python
def load(cls, env): # type: (Env) -> InstalledRepository """ Load installed packages. For now, it uses the pip "freeze" command. """ repo = cls() freeze_output = env.run("pip", "freeze") for line in freeze_output.split("\n"): if "==" in line: ...
[ "def", "load", "(", "cls", ",", "env", ")", ":", "# type: (Env) -> InstalledRepository", "repo", "=", "cls", "(", ")", "freeze_output", "=", "env", ".", "run", "(", "\"pip\"", ",", "\"freeze\"", ")", "for", "line", "in", "freeze_output", ".", "split", "(",...
Load installed packages. For now, it uses the pip "freeze" command.
[ "Load", "installed", "packages", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/repositories/installed_repository.py#L11-L44
train
Load installed packages.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/version/version_selector.py
VersionSelector.find_best_candidate
def find_best_candidate( self, package_name, # type: str target_package_version=None, # type: Union[str, None] allow_prereleases=False, # type: bool ): # type: (...) -> Union[Package, bool] """ Given a package name and optional version, returns the latest...
python
def find_best_candidate( self, package_name, # type: str target_package_version=None, # type: Union[str, None] allow_prereleases=False, # type: bool ): # type: (...) -> Union[Package, bool] """ Given a package name and optional version, returns the latest...
[ "def", "find_best_candidate", "(", "self", ",", "package_name", ",", "# type: str", "target_package_version", "=", "None", ",", "# type: Union[str, None]", "allow_prereleases", "=", "False", ",", "# type: bool", ")", ":", "# type: (...) -> Union[Package, bool]", "if", "t...
Given a package name and optional version, returns the latest Package that matches
[ "Given", "a", "package", "name", "and", "optional", "version", "returns", "the", "latest", "Package", "that", "matches" ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/version/version_selector.py#L13-L47
train
Given a package name and optional version returns the latest Package that matches the given version.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/repositories/legacy_repository.py
Page.clean_link
def clean_link(self, url): """Makes sure a link is fully encoded. That is, if a ' ' shows up in the link, it will be rewritten to %20 (while not over-quoting % or other characters).""" return self._clean_re.sub(lambda match: "%%%2x" % ord(match.group(0)), url)
python
def clean_link(self, url): """Makes sure a link is fully encoded. That is, if a ' ' shows up in the link, it will be rewritten to %20 (while not over-quoting % or other characters).""" return self._clean_re.sub(lambda match: "%%%2x" % ord(match.group(0)), url)
[ "def", "clean_link", "(", "self", ",", "url", ")", ":", "return", "self", ".", "_clean_re", ".", "sub", "(", "lambda", "match", ":", "\"%%%2x\"", "%", "ord", "(", "match", ".", "group", "(", "0", ")", ")", ",", "url", ")" ]
Makes sure a link is fully encoded. That is, if a ' ' shows up in the link, it will be rewritten to %20 (while not over-quoting % or other characters).
[ "Makes", "sure", "a", "link", "is", "fully", "encoded", ".", "That", "is", "if", "a", "shows", "up", "in", "the", "link", "it", "will", "be", "rewritten", "to", "%20", "(", "while", "not", "over", "-", "quoting", "%", "or", "other", "characters", ")"...
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/repositories/legacy_repository.py#L143-L147
train
Makes sure a link is fully encoded.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/repositories/legacy_repository.py
LegacyRepository.package
def package( self, name, version, extras=None ): # type: (...) -> poetry.packages.Package """ Retrieve the release information. This is a heavy task which takes time. We have to download a package to get the dependencies. We also need to download every file matching...
python
def package( self, name, version, extras=None ): # type: (...) -> poetry.packages.Package """ Retrieve the release information. This is a heavy task which takes time. We have to download a package to get the dependencies. We also need to download every file matching...
[ "def", "package", "(", "self", ",", "name", ",", "version", ",", "extras", "=", "None", ")", ":", "# type: (...) -> poetry.packages.Package", "try", ":", "index", "=", "self", ".", "_packages", ".", "index", "(", "poetry", ".", "packages", ".", "Package", ...
Retrieve the release information. This is a heavy task which takes time. We have to download a package to get the dependencies. We also need to download every file matching this release to get the various hashes. Note that, this will be cached so the subsequent operations ...
[ "Retrieve", "the", "release", "information", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/repositories/legacy_repository.py#L246-L325
train
Returns a new package with the given name version and optional dependencies.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/console/commands/command.py
Command.run
def run(self, i, o): # type: () -> int """ Initialize command. """ self.input = i self.output = PoetryStyle(i, o) for logger in self._loggers: self.register_logger(logging.getLogger(logger)) return super(BaseCommand, self).run(i, o)
python
def run(self, i, o): # type: () -> int """ Initialize command. """ self.input = i self.output = PoetryStyle(i, o) for logger in self._loggers: self.register_logger(logging.getLogger(logger)) return super(BaseCommand, self).run(i, o)
[ "def", "run", "(", "self", ",", "i", ",", "o", ")", ":", "# type: () -> int", "self", ".", "input", "=", "i", "self", ".", "output", "=", "PoetryStyle", "(", "i", ",", "o", ")", "for", "logger", "in", "self", ".", "_loggers", ":", "self", ".", "r...
Initialize command.
[ "Initialize", "command", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/console/commands/command.py#L67-L77
train
Initialize command.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/console/commands/command.py
Command.register_logger
def register_logger(self, logger): """ Register a new logger. """ handler = CommandHandler(self) handler.setFormatter(CommandFormatter()) logger.handlers = [handler] logger.propagate = False output = self.output level = logging.WARNING if ...
python
def register_logger(self, logger): """ Register a new logger. """ handler = CommandHandler(self) handler.setFormatter(CommandFormatter()) logger.handlers = [handler] logger.propagate = False output = self.output level = logging.WARNING if ...
[ "def", "register_logger", "(", "self", ",", "logger", ")", ":", "handler", "=", "CommandHandler", "(", "self", ")", "handler", ".", "setFormatter", "(", "CommandFormatter", "(", ")", ")", "logger", ".", "handlers", "=", "[", "handler", "]", "logger", ".", ...
Register a new logger.
[ "Register", "a", "new", "logger", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/console/commands/command.py#L79-L95
train
Register a new logger.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/masonry/publishing/uploader.py
Uploader._register
def _register(self, session, url): """ Register a package to a repository. """ dist = self._poetry.file.parent / "dist" file = dist / "{}-{}.tar.gz".format( self._package.name, normalize_version(self._package.version.text) ) if not file.exists(): ...
python
def _register(self, session, url): """ Register a package to a repository. """ dist = self._poetry.file.parent / "dist" file = dist / "{}-{}.tar.gz".format( self._package.name, normalize_version(self._package.version.text) ) if not file.exists(): ...
[ "def", "_register", "(", "self", ",", "session", ",", "url", ")", ":", "dist", "=", "self", ".", "_poetry", ".", "file", ".", "parent", "/", "\"dist\"", "file", "=", "dist", "/", "\"{}-{}.tar.gz\"", ".", "format", "(", "self", ".", "_package", ".", "...
Register a package to a repository.
[ "Register", "a", "package", "to", "a", "repository", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/masonry/publishing/uploader.py#L256-L282
train
Register a package to a repository.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/repositories/pypi_repository.py
PyPiRepository.find_packages
def find_packages( self, name, # type: str constraint=None, # type: Union[VersionConstraint, str, None] extras=None, # type: Union[list, None] allow_prereleases=False, # type: bool ): # type: (...) -> List[Package] """ Find packages on the remote server. ...
python
def find_packages( self, name, # type: str constraint=None, # type: Union[VersionConstraint, str, None] extras=None, # type: Union[list, None] allow_prereleases=False, # type: bool ): # type: (...) -> List[Package] """ Find packages on the remote server. ...
[ "def", "find_packages", "(", "self", ",", "name", ",", "# type: str", "constraint", "=", "None", ",", "# type: Union[VersionConstraint, str, None]", "extras", "=", "None", ",", "# type: Union[list, None]", "allow_prereleases", "=", "False", ",", "# type: bool", ")", "...
Find packages on the remote server.
[ "Find", "packages", "on", "the", "remote", "server", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/repositories/pypi_repository.py#L83-L148
train
Find packages on the remote server.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/repositories/pypi_repository.py
PyPiRepository.get_package_info
def get_package_info(self, name): # type: (str) -> dict """ Return the package information given its name. The information is returned from the cache if it exists or retrieved from the remote server. """ if self._disable_cache: return self._get_package_info(...
python
def get_package_info(self, name): # type: (str) -> dict """ Return the package information given its name. The information is returned from the cache if it exists or retrieved from the remote server. """ if self._disable_cache: return self._get_package_info(...
[ "def", "get_package_info", "(", "self", ",", "name", ")", ":", "# type: (str) -> dict", "if", "self", ".", "_disable_cache", ":", "return", "self", ".", "_get_package_info", "(", "name", ")", "return", "self", ".", "_cache", ".", "store", "(", "\"packages\"", ...
Return the package information given its name. The information is returned from the cache if it exists or retrieved from the remote server.
[ "Return", "the", "package", "information", "given", "its", "name", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/repositories/pypi_repository.py#L230-L242
train
Returns the package information given its name.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/repositories/pypi_repository.py
PyPiRepository.get_release_info
def get_release_info(self, name, version): # type: (str, str) -> dict """ Return the release information given a package name and a version. The information is returned from the cache if it exists or retrieved from the remote server. """ if self._disable_cache: ...
python
def get_release_info(self, name, version): # type: (str, str) -> dict """ Return the release information given a package name and a version. The information is returned from the cache if it exists or retrieved from the remote server. """ if self._disable_cache: ...
[ "def", "get_release_info", "(", "self", ",", "name", ",", "version", ")", ":", "# type: (str, str) -> dict", "if", "self", ".", "_disable_cache", ":", "return", "self", ".", "_get_release_info", "(", "name", ",", "version", ")", "cached", "=", "self", ".", "...
Return the release information given a package name and a version. The information is returned from the cache if it exists or retrieved from the remote server.
[ "Return", "the", "release", "information", "given", "a", "package", "name", "and", "a", "version", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/repositories/pypi_repository.py#L251-L276
train
Returns the release information given a package name and a version.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/masonry/builders/wheel.py
WheelBuilder.make
def make(cls, poetry, env, io): """Build a wheel in the dist/ directory, and optionally upload it.""" cls.make_in(poetry, env, io)
python
def make(cls, poetry, env, io): """Build a wheel in the dist/ directory, and optionally upload it.""" cls.make_in(poetry, env, io)
[ "def", "make", "(", "cls", ",", "poetry", ",", "env", ",", "io", ")", ":", "cls", ".", "make_in", "(", "poetry", ",", "env", ",", "io", ")" ]
Build a wheel in the dist/ directory, and optionally upload it.
[ "Build", "a", "wheel", "in", "the", "dist", "/", "directory", "and", "optionally", "upload", "it", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/masonry/builders/wheel.py#L55-L57
train
Build a wheel in the dist directory optionally upload it.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/masonry/builders/wheel.py
WheelBuilder._write_entry_points
def _write_entry_points(self, fp): """ Write entry_points.txt. """ entry_points = self.convert_entry_points() for group_name in sorted(entry_points): fp.write("[{}]\n".format(group_name)) for ep in sorted(entry_points[group_name]): fp.writ...
python
def _write_entry_points(self, fp): """ Write entry_points.txt. """ entry_points = self.convert_entry_points() for group_name in sorted(entry_points): fp.write("[{}]\n".format(group_name)) for ep in sorted(entry_points[group_name]): fp.writ...
[ "def", "_write_entry_points", "(", "self", ",", "fp", ")", ":", "entry_points", "=", "self", ".", "convert_entry_points", "(", ")", "for", "group_name", "in", "sorted", "(", "entry_points", ")", ":", "fp", ".", "write", "(", "\"[{}]\\n\"", ".", "format", "...
Write entry_points.txt.
[ "Write", "entry_points", ".", "txt", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/masonry/builders/wheel.py#L288-L299
train
Write entry_points. txt.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/utils/appdirs.py
_get_win_folder_from_registry
def _get_win_folder_from_registry(csidl_name): """ This is a fallback technique at best. I'm not sure if using the registry for this guarantees us the correct answer for all CSIDL_* names. """ import _winreg shell_folder_name = { "CSIDL_APPDATA": "AppData", "CSIDL_COMMON_APP...
python
def _get_win_folder_from_registry(csidl_name): """ This is a fallback technique at best. I'm not sure if using the registry for this guarantees us the correct answer for all CSIDL_* names. """ import _winreg shell_folder_name = { "CSIDL_APPDATA": "AppData", "CSIDL_COMMON_APP...
[ "def", "_get_win_folder_from_registry", "(", "csidl_name", ")", ":", "import", "_winreg", "shell_folder_name", "=", "{", "\"CSIDL_APPDATA\"", ":", "\"AppData\"", ",", "\"CSIDL_COMMON_APPDATA\"", ":", "\"Common AppData\"", ",", "\"CSIDL_LOCAL_APPDATA\"", ":", "\"Local AppDat...
This is a fallback technique at best. I'm not sure if using the registry for this guarantees us the correct answer for all CSIDL_* names.
[ "This", "is", "a", "fallback", "technique", "at", "best", ".", "I", "m", "not", "sure", "if", "using", "the", "registry", "for", "this", "guarantees", "us", "the", "correct", "answer", "for", "all", "CSIDL_", "*", "names", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/utils/appdirs.py#L180-L199
train
Get the win folder name from the registry.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/installation/installer.py
Installer.lock
def lock(self): # type: () -> Installer """ Prepare the installer for locking only. """ self.update() self.execute_operations(False) self._lock = True return self
python
def lock(self): # type: () -> Installer """ Prepare the installer for locking only. """ self.update() self.execute_operations(False) self._lock = True return self
[ "def", "lock", "(", "self", ")", ":", "# type: () -> Installer", "self", ".", "update", "(", ")", "self", ".", "execute_operations", "(", "False", ")", "self", ".", "_lock", "=", "True", "return", "self" ]
Prepare the installer for locking only.
[ "Prepare", "the", "installer", "for", "locking", "only", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/installation/installer.py#L111-L119
train
Returns the installer for locking only.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/installation/installer.py
Installer._execute
def _execute(self, operation): # type: (Operation) -> None """ Execute a given operation. """ method = operation.job_type getattr(self, "_execute_{}".format(method))(operation)
python
def _execute(self, operation): # type: (Operation) -> None """ Execute a given operation. """ method = operation.job_type getattr(self, "_execute_{}".format(method))(operation)
[ "def", "_execute", "(", "self", ",", "operation", ")", ":", "# type: (Operation) -> None", "method", "=", "operation", ".", "job_type", "getattr", "(", "self", ",", "\"_execute_{}\"", ".", "format", "(", "method", ")", ")", "(", "operation", ")" ]
Execute a given operation.
[ "Execute", "a", "given", "operation", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/installation/installer.py#L300-L306
train
Execute a given operation.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
sdispater/poetry
poetry/installation/installer.py
Installer._get_extra_packages
def _get_extra_packages(self, repo): """ Returns all packages required by extras. Maybe we just let the solver handle it? """ if self._update: extras = {k: [d.name for d in v] for k, v in self._package.extras.items()} else: extras = self._locker.l...
python
def _get_extra_packages(self, repo): """ Returns all packages required by extras. Maybe we just let the solver handle it? """ if self._update: extras = {k: [d.name for d in v] for k, v in self._package.extras.items()} else: extras = self._locker.l...
[ "def", "_get_extra_packages", "(", "self", ",", "repo", ")", ":", "if", "self", ".", "_update", ":", "extras", "=", "{", "k", ":", "[", "d", ".", "name", "for", "d", "in", "v", "]", "for", "k", ",", "v", "in", "self", ".", "_package", ".", "ext...
Returns all packages required by extras. Maybe we just let the solver handle it?
[ "Returns", "all", "packages", "required", "by", "extras", "." ]
2d27acd76c165dd49f11934520a7973de7a3762a
https://github.com/sdispater/poetry/blob/2d27acd76c165dd49f11934520a7973de7a3762a/poetry/installation/installer.py#L480-L510
train
Returns all packages required by extras.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spotify/luigi
luigi/tools/luigi_grep.py
LuigiGrep._fetch_json
def _fetch_json(self): """Returns the json representation of the dep graph""" print("Fetching from url: " + self.graph_url) resp = urlopen(self.graph_url).read() return json.loads(resp.decode('utf-8'))
python
def _fetch_json(self): """Returns the json representation of the dep graph""" print("Fetching from url: " + self.graph_url) resp = urlopen(self.graph_url).read() return json.loads(resp.decode('utf-8'))
[ "def", "_fetch_json", "(", "self", ")", ":", "print", "(", "\"Fetching from url: \"", "+", "self", ".", "graph_url", ")", "resp", "=", "urlopen", "(", "self", ".", "graph_url", ")", ".", "read", "(", ")", "return", "json", ".", "loads", "(", "resp", "....
Returns the json representation of the dep graph
[ "Returns", "the", "json", "representation", "of", "the", "dep", "graph" ]
c5eca1c3c3ee2a7eb612486192a0da146710a1e9
https://github.com/spotify/luigi/blob/c5eca1c3c3ee2a7eb612486192a0da146710a1e9/luigi/tools/luigi_grep.py#L21-L25
train
Returns the json representation of the dep graph
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spotify/luigi
luigi/tools/luigi_grep.py
LuigiGrep.prefix_search
def prefix_search(self, job_name_prefix): """Searches for jobs matching the given ``job_name_prefix``.""" json = self._fetch_json() jobs = json['response'] for job in jobs: if job.startswith(job_name_prefix): yield self._build_results(jobs, job)
python
def prefix_search(self, job_name_prefix): """Searches for jobs matching the given ``job_name_prefix``.""" json = self._fetch_json() jobs = json['response'] for job in jobs: if job.startswith(job_name_prefix): yield self._build_results(jobs, job)
[ "def", "prefix_search", "(", "self", ",", "job_name_prefix", ")", ":", "json", "=", "self", ".", "_fetch_json", "(", ")", "jobs", "=", "json", "[", "'response'", "]", "for", "job", "in", "jobs", ":", "if", "job", ".", "startswith", "(", "job_name_prefix"...
Searches for jobs matching the given ``job_name_prefix``.
[ "Searches", "for", "jobs", "matching", "the", "given", "job_name_prefix", "." ]
c5eca1c3c3ee2a7eb612486192a0da146710a1e9
https://github.com/spotify/luigi/blob/c5eca1c3c3ee2a7eb612486192a0da146710a1e9/luigi/tools/luigi_grep.py#L38-L44
train
Searches for jobs matching the given job name prefix.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spotify/luigi
luigi/tools/luigi_grep.py
LuigiGrep.status_search
def status_search(self, status): """Searches for jobs matching the given ``status``.""" json = self._fetch_json() jobs = json['response'] for job in jobs: job_info = jobs[job] if job_info['status'].lower() == status.lower(): yield self._build_resul...
python
def status_search(self, status): """Searches for jobs matching the given ``status``.""" json = self._fetch_json() jobs = json['response'] for job in jobs: job_info = jobs[job] if job_info['status'].lower() == status.lower(): yield self._build_resul...
[ "def", "status_search", "(", "self", ",", "status", ")", ":", "json", "=", "self", ".", "_fetch_json", "(", ")", "jobs", "=", "json", "[", "'response'", "]", "for", "job", "in", "jobs", ":", "job_info", "=", "jobs", "[", "job", "]", "if", "job_info",...
Searches for jobs matching the given ``status``.
[ "Searches", "for", "jobs", "matching", "the", "given", "status", "." ]
c5eca1c3c3ee2a7eb612486192a0da146710a1e9
https://github.com/spotify/luigi/blob/c5eca1c3c3ee2a7eb612486192a0da146710a1e9/luigi/tools/luigi_grep.py#L46-L53
train
Searches for jobs matching the given status.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spotify/luigi
luigi/local_target.py
LocalFileSystem.move
def move(self, old_path, new_path, raise_if_exists=False): """ Move file atomically. If source and destination are located on different filesystems, atomicity is approximated but cannot be guaranteed. """ if raise_if_exists and os.path.exists(new_path): raise ...
python
def move(self, old_path, new_path, raise_if_exists=False): """ Move file atomically. If source and destination are located on different filesystems, atomicity is approximated but cannot be guaranteed. """ if raise_if_exists and os.path.exists(new_path): raise ...
[ "def", "move", "(", "self", ",", "old_path", ",", "new_path", ",", "raise_if_exists", "=", "False", ")", ":", "if", "raise_if_exists", "and", "os", ".", "path", ".", "exists", "(", "new_path", ")", ":", "raise", "FileAlreadyExists", "(", "'Destination exists...
Move file atomically. If source and destination are located on different filesystems, atomicity is approximated but cannot be guaranteed.
[ "Move", "file", "atomically", ".", "If", "source", "and", "destination", "are", "located", "on", "different", "filesystems", "atomicity", "is", "approximated", "but", "cannot", "be", "guaranteed", "." ]
c5eca1c3c3ee2a7eb612486192a0da146710a1e9
https://github.com/spotify/luigi/blob/c5eca1c3c3ee2a7eb612486192a0da146710a1e9/luigi/local_target.py#L100-L120
train
Move file atomically.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spotify/luigi
luigi/local_target.py
LocalFileSystem.rename_dont_move
def rename_dont_move(self, path, dest): """ Rename ``path`` to ``dest``, but don't move it into the ``dest`` folder (if it is a folder). This method is just a wrapper around the ``move`` method of LocalTarget. """ self.move(path, dest, raise_if_exists=True)
python
def rename_dont_move(self, path, dest): """ Rename ``path`` to ``dest``, but don't move it into the ``dest`` folder (if it is a folder). This method is just a wrapper around the ``move`` method of LocalTarget. """ self.move(path, dest, raise_if_exists=True)
[ "def", "rename_dont_move", "(", "self", ",", "path", ",", "dest", ")", ":", "self", ".", "move", "(", "path", ",", "dest", ",", "raise_if_exists", "=", "True", ")" ]
Rename ``path`` to ``dest``, but don't move it into the ``dest`` folder (if it is a folder). This method is just a wrapper around the ``move`` method of LocalTarget.
[ "Rename", "path", "to", "dest", "but", "don", "t", "move", "it", "into", "the", "dest", "folder", "(", "if", "it", "is", "a", "folder", ")", ".", "This", "method", "is", "just", "a", "wrapper", "around", "the", "move", "method", "of", "LocalTarget", ...
c5eca1c3c3ee2a7eb612486192a0da146710a1e9
https://github.com/spotify/luigi/blob/c5eca1c3c3ee2a7eb612486192a0da146710a1e9/luigi/local_target.py#L122-L128
train
Rename path to dest but don t move it into the dest folder.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...