Commits

Thomas Waldmann committed 87272c0

remove unused imports

  • Participants
  • Parent commits 286e315

Comments (0)

Files changed (65)

File MoinMoin/_tests/__init__.py

 """
 
 
-import os, shutil
-import socket, errno
+import socket
 from StringIO import StringIO
 
-from flask import current_app as app
 from flask import g as flaskg
 
-from MoinMoin import security, user
 from MoinMoin.constants.contenttypes import CHARSET
 from MoinMoin.constants.keys import NAME, CONTENTTYPE
 from MoinMoin.items import Item
 from MoinMoin.util.crypto import random_string
-from MoinMoin.storage.error import ItemAlreadyExistsError
 
 # Promoting the test user -------------------------------------------
 # Usually the tests run as anonymous user, but for some stuff, you

File MoinMoin/_tests/test_error.py

 """
 
 
-import pytest
-
 from MoinMoin import error
 
 

File MoinMoin/_tests/test_test_environ.py

 
 from StringIO import StringIO
 
-import pytest
-
 from flask import current_app as app
 from flask import g as flaskg
 
-from MoinMoin.conftest import init_test_app, deinit_test_app
 from MoinMoin.constants.keys import NAME, CONTENTTYPE
-from MoinMoin.storage.error import NoSuchItemError
 
 from MoinMoin._tests import wikiconfig
 

File MoinMoin/_tests/test_user.py

 """
 
 
-import pytest
-
-from flask import current_app as app
 from flask import g as flaskg
 
 from MoinMoin import user
-from MoinMoin.util import crypto
 
 
 class TestSimple(object):

File MoinMoin/_tests/test_wikiutil.py

 
 from MoinMoin.constants.chartypes import CHARS_SPACES
 from MoinMoin import wikiutil
-from MoinMoin._tests import wikiconfig
 
 from werkzeug import MultiDict
 

File MoinMoin/apps/admin/views.py

 from MoinMoin.themes import render_template
 from MoinMoin.apps.admin import admin
 from MoinMoin import user
-from MoinMoin.storage.error import NoSuchRevisionError
 from MoinMoin.constants.keys import NAME, ITEMID, SIZE, EMAIL
 from MoinMoin.constants.rights import SUPERUSER
 from MoinMoin.security import require_permission

File MoinMoin/apps/feed/_tests/test_feed.py

 
 from flask import url_for
 
-from MoinMoin.items import Item
 from MoinMoin.constants.keys import COMMENT
 from MoinMoin._tests import update_item, wikiconfig
 

File MoinMoin/apps/feed/views.py

 from flask import request, Response
 from flask import current_app as app
 from flask import g as flaskg
-from flask import url_for
 
 from werkzeug.contrib.atom import AtomFeed
 from jinja2 import Markup

File MoinMoin/apps/frontend/_tests/test_frontend.py

 
 from StringIO import StringIO
 
-import pytest
-
 from flask import url_for
 from flask import g as flaskg
 from werkzeug import ImmutableMultiDict, FileStorage
 
 from MoinMoin.apps.frontend import views
 from MoinMoin import user
-from MoinMoin.util import crypto
-from MoinMoin._tests import wikiconfig
 
 
 class TestFrontend(object):

File MoinMoin/apps/frontend/views.py

 import mimetypes
 import json
 from datetime import datetime
-from itertools import chain
 from collections import namedtuple
 from functools import wraps, partial
 
-from flask import request, url_for, flash, Response, make_response, redirect, session, abort, jsonify
+from flask import request, url_for, flash, Response, make_response, redirect, abort, jsonify
 from flask import current_app as app
 from flask import g as flaskg
 from flask.ext.babel import format_date
 logging = log.getLogger(__name__)
 
 from MoinMoin.i18n import _, L_, N_
-from MoinMoin.themes import render_template, get_editor_info, contenttype_to_class
+from MoinMoin.themes import render_template, contenttype_to_class
 from MoinMoin.apps.frontend import frontend
 from MoinMoin.forms import OptionalText, RequiredText, URL, YourOpenID, YourEmail, RequiredPassword, Checkbox, InlineCheckbox, Select, Names, Tags, Natural, Submit, Hidden, MultiSelect
 from MoinMoin.items import BaseChangeForm, Item, NonExistent
 from MoinMoin.constants.chartypes import CHARS_UPPER, CHARS_LOWER
 from MoinMoin.util import crypto
 from MoinMoin.util.interwiki import url_for_item
-from MoinMoin.search import SearchForm, ValidSearch
-from MoinMoin.security.textcha import TextCha, TextChaizedForm, TextChaValid
-from MoinMoin.storage.error import NoSuchItemError, NoSuchRevisionError
+from MoinMoin.search import SearchForm
+from MoinMoin.security.textcha import TextCha, TextChaizedForm
 from MoinMoin.signalling import item_displayed, item_modified
 from MoinMoin.storage.middleware.protecting import AccessDenied
 

File MoinMoin/apps/misc/views.py

 
 from MoinMoin.constants.keys import MTIME
 from MoinMoin.themes import render_template
-from MoinMoin import wikiutil
 
 SITEMAP_HAS_SYSTEM_ITEMS = True
 

File MoinMoin/auth/_tests/test_auth.py

 Test for auth.__init__
 """
 
-from flask import current_app as app
 from flask import g as flaskg
 
-import pytest
-
 from MoinMoin._tests import wikiconfig
 from MoinMoin.auth import GivenAuth, handle_login, get_multistage_continuation_url
 from MoinMoin.user import create_user

File MoinMoin/auth/_tests/test_http.py

 
 from MoinMoin.user import create_user
 from MoinMoin.auth.http import HTTPAuthMoin
-import pytest
+
 
 class TestHTTPAuthMoin(object):
     """ Test: HTTPAuthMoin """

File MoinMoin/auth/_tests/test_log.py

 
 from MoinMoin.auth.log import AuthLog
 from flask import g as flaskg
-import pytest
+
 
 class TestAuthLog(object):
     """ Test: TestAuthLog """

File MoinMoin/auth/http.py

 
 from flask import request
 
-from MoinMoin import config, user
+from MoinMoin import user
 from MoinMoin.i18n import _, L_, N_
 from MoinMoin.auth import BaseAuth, GivenAuth
 

File MoinMoin/converter/_tests/test__args_wiki.py

 """
 
 
-import pytest
-
 from MoinMoin.converter._args_wiki import *
 
 def test():

File MoinMoin/converter/_tests/test__wiki_macro.py

 """
 
 
-import pytest
 import re
 
 from MoinMoin.converter._args import Arguments

File MoinMoin/converter/_tests/test_creole_in.py

 """
 
 
-import pytest
-
 import re
 
 from MoinMoin.util.tree import moin_page, xlink

File MoinMoin/converter/_tests/test_docbook_in.py

 import StringIO
 
 import pytest
+
 try:
     from lxml import etree
 except:

File MoinMoin/converter/_tests/test_docbook_out.py

 import StringIO
 
 import pytest
+
 try:
     from lxml import etree
 except:

File MoinMoin/converter/_tests/test_include.py

 """
 
 
-import pytest
-
 from MoinMoin.converter.include import *
 from MoinMoin.items import Item
 from MoinMoin.constants.keys import CONTENTTYPE

File MoinMoin/converter/_tests/test_moinwiki_out.py

 """
 
 
-import pytest
 import re
 
 from MoinMoin.converter.moinwiki_out import *

File MoinMoin/converter/_tests/test_registry.py

 """
 
 
-import pytest
-
 from MoinMoin.util.mime import Type, type_moin_document, type_moin_wiki
 from MoinMoin.converter import default_registry
 from MoinMoin.converter.text_in import Converter as TextInConverter

File MoinMoin/converter/_tests/test_rst_in.py

 """
 
 
-import pytest
 import re
 
 from MoinMoin.converter.rst_in import *

File MoinMoin/converter/_tests/test_rst_out.py

 """
 
 
-import pytest
 import re
 
 from MoinMoin.converter.rst_out import *

File MoinMoin/converter/link.py

 from flask import g as flaskg
 
 from MoinMoin.util.interwiki import is_known_wiki, url_for_item
-from MoinMoin.util.iri import Iri, IriPath
+from MoinMoin.util.iri import Iri
 from MoinMoin.util.mime import Type, type_moin_document
 from MoinMoin.util.tree import moin_page, xlink, xinclude
 from MoinMoin.wikiutil import AbsItemName

File MoinMoin/converter/macro.py

 from MoinMoin.converter._args import Arguments
 from MoinMoin.util import iri
 from MoinMoin.util.mime import type_moin_document, Type
-from MoinMoin.util.tree import html, moin_page
+from MoinMoin.util.tree import moin_page
 from MoinMoin.util.plugins import PluginMissingError
 
 

File MoinMoin/converter/moinwiki19_in.py

 from MoinMoin.constants.chartypes import CHARS_LOWER, CHARS_UPPER
 from MoinMoin.util.interwiki import is_known_wiki
 from MoinMoin.util.iri import Iri
-from MoinMoin.util.tree import html, moin_page, xlink
+from MoinMoin.util.tree import moin_page, xlink
 
 from .moinwiki_in import Converter
 

File MoinMoin/converter/moinwiki_in.py

 from MoinMoin.constants.contenttypes import CHARSET
 from MoinMoin.constants.misc import URI_SCHEMES
 from MoinMoin.util.iri import Iri
-from MoinMoin.util.tree import html, moin_page, xlink, xinclude
+from MoinMoin.util.tree import moin_page, xlink, xinclude
 from MoinMoin.util.interwiki import is_known_wiki
 from MoinMoin.i18n import _
 

File MoinMoin/datastruct/backends/_tests/test_composite_groups.py

 from MoinMoin.datastruct.backends._tests import GroupsBackendTest
 from MoinMoin.datastruct import ConfigGroups, CompositeGroups, GroupDoesNotExistError
 from MoinMoin._tests import wikiconfig
-from MoinMoin import security
 
 
 class TestCompositeGroupsBackend(GroupsBackendTest):

File MoinMoin/datastruct/backends/_tests/test_lazy_config_groups.py

 
 from MoinMoin.datastruct.backends._tests import GroupsBackendTest
 from MoinMoin.datastruct.backends.config_lazy_groups import ConfigLazyGroups
-from MoinMoin.datastruct import ConfigGroups, CompositeGroups, GroupDoesNotExistError
+from MoinMoin.datastruct import ConfigGroups, CompositeGroups
 from MoinMoin._tests import wikiconfig
 
 

File MoinMoin/forms.py

 from MoinMoin.constants.forms import *
 from MoinMoin.constants.keys import ITEMID, NAME
 from MoinMoin.i18n import _, L_, N_
-from MoinMoin.security.textcha import TextCha, TextChaizedForm, TextChaValid
 from MoinMoin.util.forms import FileStorage
 
 

File MoinMoin/i18n/_tests/test_i18n.py

 """
 
 from MoinMoin.i18n import get_locale, get_timezone
-import pytest
 
 from MoinMoin.i18n import _, L_, N_
 

File MoinMoin/items/__init__.py

 from MoinMoin.security.textcha import TextCha, TextChaizedForm
 from MoinMoin.signalling import item_modified
 from MoinMoin.storage.middleware.protecting import AccessDenied
-from MoinMoin.storage.error import NoSuchItemError, NoSuchRevisionError
 from MoinMoin.i18n import L_
 from MoinMoin.themes import render_template
 from MoinMoin.util.mime import Type

File MoinMoin/items/_tests/test_Content.py

 
 import pytest
 
-from flask import g as flaskg
 from flask import Markup
 
 from werkzeug import escape

File MoinMoin/items/_tests/test_Item.py

 
 import pytest
 
-from flask import g as flaskg
-from flask import Markup
-
 from werkzeug import escape
 
-from MoinMoin.util import diff_html
-
 from MoinMoin._tests import become_trusted, update_item
 from MoinMoin.items import Item, NonExistent, IndexEntry, MixedIndexEntry
-from MoinMoin.items.content import Binary, Text, Image, TransformableBitmapImage, MarkupItem
-from MoinMoin.constants.keys import ITEMTYPE, CONTENTTYPE, NAME, ADDRESS, COMMENT, HOSTNAME, USERID, ACTION
+from MoinMoin.constants.keys import ITEMTYPE, CONTENTTYPE, NAME, COMMENT
 
 
 def build_index(basename, relnames):

File MoinMoin/macro/Date.py

 import time
 from datetime import datetime
 
-from flask import g as flaskg
 from flask.ext.babel import format_date
 
 from MoinMoin.macro._base import MacroInlineBase

File MoinMoin/macro/DateTime.py

 import time
 from datetime import datetime
 
-from flask import g as flaskg
 from flask.ext.babel import format_datetime
 
 from MoinMoin.macro.Date import MacroDateTimeBase

File MoinMoin/macro/_tests/test_GetText.py

 Test for macro.GetText
 """
 
-import pytest
 from MoinMoin.converter._args import Arguments
 from MoinMoin.macro.GetText import *
 

File MoinMoin/script/account/create.py

 """
 
 
-from flask import current_app as app
-from flask import g as flaskg
 from flask.ext.script import Command, Option
 
 from MoinMoin import user

File MoinMoin/script/account/disable.py

 """
 
 
-from flask import current_app as app
-from flask import g as flaskg
 from flask.ext.script import Command, Option
 
 from MoinMoin import user

File MoinMoin/script/account/resetpw.py

 """
 
 
-from flask import current_app as app
-from flask import g as flaskg
 from flask.ext.script import Command, Option
 
 from MoinMoin.constants.keys import ITEMID, NAME, NAME_EXACT, EMAIL

File MoinMoin/script/maint/index.py

 
 
 from flask import current_app as app
-from flask import g as flaskg
 from flask.ext.script import Command, Option
 
 from MoinMoin import log

File MoinMoin/script/maint/modify_item.py

 import json
 
 from flask import current_app as app
-from flask import g as flaskg
 from flask.ext.script import Command, Option
 
 from MoinMoin.constants.keys import CURRENT, ITEMID, REVID, DATAID, SIZE, HASH_ALGORITHM

File MoinMoin/script/maint/moinshell.py

 
 import code
 
-from flask import Flask, _request_ctx_stack
 from flask import current_app as app
 from flask import g as flaskg
 from flask.ext.script import Command, Option
 
-from MoinMoin import user
 from MoinMoin.app import before_wiki
-from MoinMoin.util.clock import Clock
+
 
 class MoinShell(Command):
     """

File MoinMoin/script/maint/serialization.py

 import sys
 
 from flask import current_app as app
-from flask import g as flaskg
 from flask.ext.script import Command, Option
 
 from MoinMoin.storage.middleware.serialization import serialize, deserialize

File MoinMoin/script/migration/moin19/import19.py

 """
 
 
-import sys
 import os
 import re
 import codecs
 from MoinMoin.storage.error import NoSuchRevisionError
 from MoinMoin.util.mimetype import MimeType
 from MoinMoin.util.crypto import make_uuid
-from MoinMoin.storage.middleware.serialization import serialize_rev
 from MoinMoin import security
 
 

File MoinMoin/security/_tests/test_textcha.py

 from flask import current_app as app
 from flask import g as flaskg
 
-import pytest
-
 from MoinMoin.security.textcha import TextCha, TextChaValid, TextChaizedForm
 from MoinMoin.constants.keys import LOCALE
 

File MoinMoin/security/_tests/test_ticket.py

 """
 
 
-import py
-
 from MoinMoin.security.ticket import createTicket, checkTicket
 
 

File MoinMoin/storage/backends/_tests/test_fileserver.py

 import os
 import tempfile
 
-import pytest
-
 from MoinMoin.constants.keys import NAME, MTIME, REVID, ITEMID, HASH_ALGORITHM
 from ..fileserver import Backend
 from . import BackendTestBase

File MoinMoin/storage/backends/_tests/test_stores.py

 
 from __future__ import absolute_import, division
 
-import pytest
-
 from ..stores import MutableBackend
 from . import MutableBackendTestBase
 

File MoinMoin/storage/middleware/_tests/test_indexing.py

 from MoinMoin.constants.keys import (NAME, SIZE, ITEMID, REVID, DATAID, HASH_ALGORITHM, CONTENT, COMMENT,
                                      LATEST_REVS, ALL_REVS, NAMESPACE)
 
-from ..indexing import IndexingMiddleware
-
 from MoinMoin.auth import GivenAuth
 from MoinMoin._tests import wikiconfig
-from MoinMoin.storage.backends.stores import MutableBackend
-from MoinMoin.storage.stores.memory import BytesStore as MemoryBytesStore
-from MoinMoin.storage.stores.memory import FileStore as MemoryFileStore
-from MoinMoin.storage import create_simple_mapping
 
 
 def dumper(indexer, idx_name):

File MoinMoin/storage/middleware/_tests/test_validation.py

 
 from __future__ import absolute_import, division
 
-import pytest
-
 from MoinMoin.storage.middleware.validation import ContentMetaSchema, UserMetaSchema
 
 from MoinMoin.constants import keys

File MoinMoin/storage/middleware/indexing.py

 
 import os
 import shutil
-import itertools
-import time
 import datetime
 
 from MoinMoin import log

File MoinMoin/themes/__init__.py

 import urllib
 
 from json import dumps
-from operator import attrgetter
 
 from flask import current_app as app
 from flask import g as flaskg

File MoinMoin/user.py

 from flask import g as flaskg
 from flask import session, request, url_for
 
-from whoosh.query import Term, And, Or
-
 from MoinMoin import log
 logging = log.getLogger(__name__)
 

File MoinMoin/util/_tests/test_crypto.py

 """
 
 
-import pytest
 from MoinMoin.util import crypto
 
 

File MoinMoin/util/_tests/test_diff_html.py

 MoinMoin - MoinMoin.util.diff_html Tests
 """
 
-import pytest
+
 from MoinMoin.util import diff_html
 
 def test_indent():

File MoinMoin/util/_tests/test_forms.py

 """
 
 from MoinMoin.util import forms
-import pytest
+
 
 class Bind(object):
     """ class for self defined test_bind attributes """

File MoinMoin/util/_tests/test_mime.py

 """
 
 
-import pytest
-
 from MoinMoin.util.mime import *
 
 def test_Type_init_1():

File MoinMoin/util/_tests/test_mimetype.py

 MoinMoin - MoinMoin.util.mimetype Tests
 """
 
-import pytest
+
 from MoinMoin.util import mimetype
 
 class TestMimeType(object):

File MoinMoin/util/_tests/test_thread_monitor.py

 import shutil, tempfile
 import os
 
-import pytest
 from MoinMoin.util.thread_monitor import Monitor
 
 class TestMonitor(object):

File MoinMoin/util/_tests/test_tree.py

 """
 
 
-import pytest
-
 from MoinMoin.util.tree import *
 
 def test_Name():

File MoinMoin/util/filesys.py

 
 import sys, os, shutil, time, errno
 from stat import S_ISDIR, ST_MODE, S_IMODE
-import warnings
 
 from MoinMoin import log
 logging = log.getLogger(__name__)

File MoinMoin/wikiutil.py

 from __future__ import absolute_import, division
 
 import os
-import re
-import time
 
 from MoinMoin import log
 logging = log.getLogger(__name__)
 from MoinMoin.constants.contenttypes import DRAWING_EXTENSIONS
 
 from MoinMoin.i18n import _, L_, N_
-from MoinMoin.util import pysupport
 from MoinMoin.util.mimetype import MimeType
 from MoinMoin.storage.error import NoSuchItemError, NoSuchRevisionError