[gedit-latex] Remove some useless imports
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-latex] Remove some useless imports
- Date: Sun, 15 Jul 2012 10:07:06 +0000 (UTC)
commit ee95624ac2c460e34b9844749b46a2ceb9999255
Author: Sven (Sbte) <svenb linux gmail com>
Date: Sat Jul 14 22:56:16 2012 +0200
Remove some useless imports
latex/appactivatable.py | 1 -
latex/bibtex/actions.py | 3 ---
latex/bibtex/completion.py | 2 +-
latex/bibtex/dialogs.py | 1 -
latex/bibtex/editor.py | 2 +-
latex/bibtex/parser.py | 5 +----
latex/bibtex/views.py | 2 --
latex/completion.py | 2 +-
latex/editor.py | 2 +-
latex/latex/actions.py | 2 +-
latex/latex/completion.py | 4 ++--
latex/latex/dialogs.py | 1 -
latex/latex/editor.py | 4 +---
latex/latex/model.py | 1 -
latex/latex/outline.py | 6 +-----
latex/latex/parser.py | 3 ---
latex/latex/preview.py | 2 +-
latex/latex/views.py | 1 -
latex/panelview.py | 2 --
latex/preferences/dialog.py | 1 -
latex/snippetmanager.py | 1 -
latex/tabdecorator.py | 2 +-
latex/util.py | 1 -
latex/windowactivatable.py | 1 -
latex/windowcontext.py | 2 --
25 files changed, 12 insertions(+), 42 deletions(-)
---
diff --git a/latex/appactivatable.py b/latex/appactivatable.py
index c5eb990..f735caa 100644
--- a/latex/appactivatable.py
+++ b/latex/appactivatable.py
@@ -15,7 +15,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-import sys
import os.path
import platform
diff --git a/latex/bibtex/actions.py b/latex/bibtex/actions.py
index 2554552..a4b3602 100644
--- a/latex/bibtex/actions.py
+++ b/latex/bibtex/actions.py
@@ -22,9 +22,6 @@
latex.actions
"""
-from logging import getLogger
-from gi.repository import Gtk
-
from ..action import Action
from ..gldefs import _
from dialogs import InsertBibTeXEntryDialog
diff --git a/latex/bibtex/completion.py b/latex/bibtex/completion.py
index 150778a..4149535 100644
--- a/latex/bibtex/completion.py
+++ b/latex/bibtex/completion.py
@@ -24,7 +24,7 @@ bibtex.completion
import logging
-from gi.repository import Gdk, GdkPixbuf
+from gi.repository import GdkPixbuf
from ..preferences import Preferences
from ..resources import Resources
diff --git a/latex/bibtex/dialogs.py b/latex/bibtex/dialogs.py
index cad9f20..5fb35ff 100644
--- a/latex/bibtex/dialogs.py
+++ b/latex/bibtex/dialogs.py
@@ -22,7 +22,6 @@
latex.dialogs
"""
-from logging import getLogger
from gi.repository import Gtk
from ..util import GladeInterface
diff --git a/latex/bibtex/editor.py b/latex/bibtex/editor.py
index b7dec05..9ad1ba6 100644
--- a/latex/bibtex/editor.py
+++ b/latex/bibtex/editor.py
@@ -32,7 +32,7 @@ from ..preferences import Preferences
from ..issues import Issue, IIssueHandler, MockIssueHandler
from ..util import verbose
-from ..job import Job, JobChangeListener, JobManager
+from ..job import Job, JobChangeListener
from parser import BibTeXParser
from completion import BibTeXCompletionHandler
diff --git a/latex/bibtex/parser.py b/latex/bibtex/parser.py
index 251a64a..f98412d 100644
--- a/latex/bibtex/parser.py
+++ b/latex/bibtex/parser.py
@@ -55,12 +55,9 @@ BibTeX parser and object model
# # normal package code...
# #
-
-from logging import getLogger
-from os.path import getmtime
from xml.sax.saxutils import escape
-from ..issues import Issue, MockIssueHandler
+from ..issues import Issue
from ..preferences import Preferences
class Token(object):
diff --git a/latex/bibtex/views.py b/latex/bibtex/views.py
index d59dcd7..96252b0 100644
--- a/latex/bibtex/views.py
+++ b/latex/bibtex/views.py
@@ -28,8 +28,6 @@ from gi.repository import Gtk, GdkPixbuf
from xml.sax.saxutils import escape
from logging import getLogger
-import time
-
from ..outline import OutlineOffsetMap, BaseOutlineView
from ..resources import Resources
from ..preferences import Preferences
diff --git a/latex/completion.py b/latex/completion.py
index c68b8b4..3b4c638 100644
--- a/latex/completion.py
+++ b/latex/completion.py
@@ -23,7 +23,7 @@ base.completion
"""
from logging import getLogger
-from gi.repository import GObject, Gtk, Gdk, GdkPixbuf, GtkSource, Gedit
+from gi.repository import GObject, Gtk, Gdk, GdkPixbuf
from .preferences import Preferences
diff --git a/latex/editor.py b/latex/editor.py
index 8c63285..f8ad525 100644
--- a/latex/editor.py
+++ b/latex/editor.py
@@ -23,7 +23,7 @@ import time
import logging
import uuid
-from gi.repository import GObject, Gtk, Gdk
+from gi.repository import Gtk, Gdk
from .completion import CompletionDistributor
from .snippetmanager import SnippetManager
diff --git a/latex/latex/actions.py b/latex/latex/actions.py
index a63fa0a..6094a3f 100644
--- a/latex/latex/actions.py
+++ b/latex/latex/actions.py
@@ -34,7 +34,7 @@ from .editor import LaTeXEditor
from .parser import LaTeXParser, Node
from .dialogs import UseBibliographyDialog, InsertGraphicsDialog, InsertTableDialog, \
InsertListingDialog, BuildImageDialog, \
- NewDocumentDialog, ChooseMasterDialog
+ NewDocumentDialog
from . import LaTeXSource
LOG = getLogger(__name__)
diff --git a/latex/latex/completion.py b/latex/latex/completion.py
index 7eddd09..bca2c7c 100644
--- a/latex/latex/completion.py
+++ b/latex/latex/completion.py
@@ -25,7 +25,7 @@ LaTeX-specific completion classes
"""
from logging import getLogger
-from gi.repository import Gdk, GdkPixbuf
+from gi.repository import GdkPixbuf
from ..resources import Resources
from ..completion import ICompletionHandler, Proposal
@@ -96,7 +96,7 @@ class LaTeXChoiceProposal(Proposal):
return self._overlap
-from model import LanguageModelFactory, Command, Choice, MandatoryArgument, OptionalArgument
+from model import LanguageModelFactory, Choice, MandatoryArgument, OptionalArgument
from parser import PrefixParser, Node
from ..bibtex.cache import BibTeXDocumentCache
diff --git a/latex/latex/dialogs.py b/latex/latex/dialogs.py
index f9f98c6..5e7cacf 100644
--- a/latex/latex/dialogs.py
+++ b/latex/latex/dialogs.py
@@ -25,7 +25,6 @@ latex.dialogs
import logging
import tempfile
import os.path
-import time
import string
from gi.repository import Gtk, GdkPixbuf
diff --git a/latex/latex/editor.py b/latex/latex/editor.py
index 010cf98..fd93ef6 100644
--- a/latex/latex/editor.py
+++ b/latex/latex/editor.py
@@ -27,13 +27,11 @@ BENCHMARK = True
import logging
if BENCHMARK: import time
-from gi.repository import Gtk, GObject
-from gi.repository import Gdk
+from gi.repository import GObject
from ..editor import Editor
from ..file import File
from ..issues import Issue, IIssueHandler
-from ..util import verbose, open_error
from parser import LaTeXParser
from expander import LaTeXReferenceExpander
diff --git a/latex/latex/model.py b/latex/latex/model.py
index 678b92d..50f5b52 100644
--- a/latex/latex/model.py
+++ b/latex/latex/model.py
@@ -268,7 +268,6 @@ class LanguageModelParser(sax.ContentHandler):
self.__language_model.register_placeholder(placeholder)
-from copy import deepcopy
import pickle
from ..file import File
diff --git a/latex/latex/outline.py b/latex/latex/outline.py
index fbd5175..8fcdc67 100644
--- a/latex/latex/outline.py
+++ b/latex/latex/outline.py
@@ -23,10 +23,6 @@ latex.outline
"""
from logging import getLogger
-from gi.repository import Gtk
-from gi.repository import Gdk
-from os.path import basename
-
from parser import Node
from ..issues import Issue
@@ -75,7 +71,7 @@ class Outline(object):
REF_CMDS = set(("ref","eqref","pageref"))
def is_ref_command(self, cmd_name):
- return (cmd_name in REF_CMDS) or (cmd_name in self.new_ref_commands)
+ return (cmd_name in self.REF_CMDS) or (cmd_name in self.new_ref_commands)
from ..file import File
from ..preferences import Preferences
diff --git a/latex/latex/parser.py b/latex/latex/parser.py
index c73bb09..534de5c 100644
--- a/latex/latex/parser.py
+++ b/latex/latex/parser.py
@@ -24,9 +24,6 @@ latex.parser
LaTeX parser and object model
"""
-from logging import getLogger
-from os.path import exists
-from os import popen, system
from re import compile
from ..util import verbose, escape
diff --git a/latex/latex/preview.py b/latex/latex/preview.py
index c710737..b3c2555 100644
--- a/latex/latex/preview.py
+++ b/latex/latex/preview.py
@@ -28,7 +28,7 @@ from ..tools.postprocess import RubberPostProcessor, GenericPostProcessor
from ..issues import MockStructuredIssueHandler
from environment import Environment
-from gi.repository import Gdk, GdkPixbuf
+from gi.repository import GdkPixbuf
class ImageToolGenerator(object):
"""
diff --git a/latex/latex/views.py b/latex/latex/views.py
index 3fd0e33..53b4395 100644
--- a/latex/latex/views.py
+++ b/latex/latex/views.py
@@ -36,7 +36,6 @@ from ..panelview import PanelView
from ..file import File
from ..resources import Resources
from ..snippetmanager import SnippetManager
-from ..issues import Issue
from ..outline import OutlineOffsetMap, BaseOutlineView
from outline import OutlineNode
from ..gldefs import _
diff --git a/latex/panelview.py b/latex/panelview.py
index 8fd4090..e8bb6de 100644
--- a/latex/panelview.py
+++ b/latex/panelview.py
@@ -18,8 +18,6 @@
# this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
# Street, Fifth Floor, Boston, MA 02110-1301, USA
-import logging
-
from gi.repository import GObject, Gtk
class PanelView(Gtk.Bin, Gtk.Orientable):
diff --git a/latex/preferences/dialog.py b/latex/preferences/dialog.py
index 37e70fa..04ab2db 100644
--- a/latex/preferences/dialog.py
+++ b/latex/preferences/dialog.py
@@ -24,7 +24,6 @@ preferences.dialog
from logging import getLogger
from gi.repository import Gtk
-from gi.repository import Gdk
from ..resources import Resources
from ..util import GladeInterface
diff --git a/latex/snippetmanager.py b/latex/snippetmanager.py
index af8eb86..3f14c01 100644
--- a/latex/snippetmanager.py
+++ b/latex/snippetmanager.py
@@ -17,7 +17,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330,
# Boston, MA 02111-1307, USA.
-from gi.repository import Gtk, Gedit
from singleton import Singleton
import logging
diff --git a/latex/tabdecorator.py b/latex/tabdecorator.py
index 054b9e0..9d48dd4 100644
--- a/latex/tabdecorator.py
+++ b/latex/tabdecorator.py
@@ -27,7 +27,7 @@ extension point.
import logging
-from gi.repository import Gedit, Gtk, Gio, GObject
+from gi.repository import GObject
from .config import EDITORS
from .file import File
diff --git a/latex/util.py b/latex/util.py
index 058a320..1b56ff1 100644
--- a/latex/util.py
+++ b/latex/util.py
@@ -26,7 +26,6 @@ the project
"""
import logging
-from gi.repository import GdkPixbuf
def singleton(cls):
"""
diff --git a/latex/windowactivatable.py b/latex/windowactivatable.py
index f98a37e..8ad3803 100644
--- a/latex/windowactivatable.py
+++ b/latex/windowactivatable.py
@@ -32,7 +32,6 @@ from .preferences.dialog import PreferencesDialog
from .preferences.tools import ToolPreferences
from .tools import ToolAction
from .resources import Resources
-from .file import File
from .panelview import PanelView
from .config import EDITOR_VIEWS, ACTIONS
from .tabdecorator import GeditTabDecorator
diff --git a/latex/windowcontext.py b/latex/windowcontext.py
index cc9af01..da0a44f 100644
--- a/latex/windowcontext.py
+++ b/latex/windowcontext.py
@@ -26,8 +26,6 @@ These classes form the interface exposed by the plugin base layer.
import logging
-from gi.repository import GObject, Gtk, Gdk
-
from .file import File
LOG = logging.getLogger(__name__)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]