Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes unused code #20

Merged
merged 1 commit into from May 29, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Removes unused code

  • Loading branch information...
RohanVB committed May 29, 2019
commit 31b315e0a0c744f0c606ceb41f469300df231254
@@ -3,47 +3,19 @@
import os.path as osp
import re
import sys
import time
import subprocess
import ast

"""
Third Party Imports
getopenfilename: for selecting python files to run linter on
QByteArray: used to store raw bytes
QProcess: for reading output
QTextCodec: used to retrieve text from bytes
Signal and slot: signal emitted when an event occurs, slot is a function response to that signal
QTWidgets: UI buttons, layout, etc,.
"""
# from coalib.coala import main as coala
from qtpy.compat import getopenfilename
from qtpy.QtCore import QByteArray, QProcess, QTextCodec, Signal, Slot
from qtpy.QtWidgets import (QHBoxLayout, QLabel, QMessageBox, QTreeWidgetItem,
QVBoxLayout, QWidget)

"""
Local Imports
dependencies: Checks for missing dependencies
get_conf_path: gets path of results
get_translation: used for testing as standalone script
pickle: pickled format
to_text_string: return text string
to_unicode_from_fs: return unicode string from file system encoding
create_toolbutton: creates QToolButton
get_cwd_or_home: get_cwd() or if cwd() is deleted, gets home directory
is_module_or_package: returns true if PATH is module or package
PythonModulesComboBox: QComboBox?
OneColumnTree: returns qtreewidget
TextEditor: Actual text editor with a "save and close" button
"""
from run_coala import UseCoala as coala
from spyder import dependencies
from spyder.config.base import get_conf_path, get_translation
from spyder.py3compat import pickle, to_text_string
from spyder.utils import icon_manager as ima
from spyder.utils.encoding import to_unicode_from_fs
from spyder.utils.qthelpers import create_toolbutton
from spyder.utils.misc import getcwd_or_home
from spyder.widgets.comboboxes import (is_module_or_package,
@@ -65,6 +37,7 @@
dependencies.add("coala", _("Static code analysis"),
required_version=COALA_REQVER, installed_version=COALA_VER)


class ResultsTree(OneColumnTree):
sig_edit_goto = Signal(str, int, str)

@@ -95,7 +68,6 @@ def set_results(self, filename, results):
self.results = results
self.refresh()

# todo: fix this
def refresh(self):
title = _('Results for ') + self.filename
self.set_title(title)
@@ -387,6 +359,7 @@ def show_data(self, justanalyzed=False):
results = data
self.treewidget.set_results(filename, results)


def test():
"""Run coala widget test"""
from spyder.utils.qthelpers import qapplication
@@ -397,5 +370,6 @@ def test():
widget.analyze(__file__)
sys.exit(app.exec_())


if __name__ == '__main__':
test()
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.