def copy_to_clipboard(self): from spyder.dependencies import status QApplication.clipboard().setText(status())
def render_issue(description='', traceback=''): """ Render issue content. Parameters ---------- description: str Description to include in issue message. traceback: str Traceback text. """ # Get component versions versions = get_versions() # Get dependencies if they haven't beed computed yet. if not dependencies.DEPENDENCIES: try: dependencies.declare_dependencies() except ValueError: pass # Get git revision for development version revision = '' if versions['revision']: revision = versions['revision'] # Make a description header in case no description is supplied if not description: description = "### What steps reproduce the problem?" # Make error section from traceback and add appropriate reminder header if traceback: error_section = ("### Traceback\n" "```python-traceback\n" "{}\n" "```".format(traceback)) else: error_section = '' issue_template = """\ ## Description {description} {error_section} ## Versions * Spyder version: {spyder_version} {commit} * Python version: {python_version} * Qt version: {qt_version} * {qt_api_name} version: {qt_api_version} * Operating System: {os_name} {os_version} ### Dependencies ``` {dependencies} ``` """.format(description=description, error_section=error_section, spyder_version=versions['spyder'], commit=revision, python_version=versions['python'], qt_version=versions['qt'], qt_api_name=versions['qt_api'], qt_api_version=versions['qt_api_ver'], os_name=versions['system'], os_version=versions['release'], dependencies=dependencies.status()) return issue_template