diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-02-10 14:10:42 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2021-02-10 15:17:25 +0100 |
commit | 666aab1a3fcd5f33659f67540d23b96fa8fa2f98 (patch) | |
tree | d6a047e2c0b34b45e3075d022012157a500d805f /alot/commands | |
parent | 752860cf24fc22208d7e9138d0a13ea5d616b4ca (diff) |
Cosmetics, clean up imports
Diffstat (limited to 'alot/commands')
-rw-r--r-- | alot/commands/__init__.py | 6 | ||||
-rw-r--r-- | alot/commands/bufferlist.py | 3 | ||||
-rw-r--r-- | alot/commands/common.py | 8 | ||||
-rw-r--r-- | alot/commands/envelope.py | 27 | ||||
-rw-r--r-- | alot/commands/globals.py | 43 | ||||
-rw-r--r-- | alot/commands/namedqueries.py | 5 | ||||
-rw-r--r-- | alot/commands/search.py | 15 | ||||
-rw-r--r-- | alot/commands/taglist.py | 5 | ||||
-rw-r--r-- | alot/commands/thread.py | 44 | ||||
-rw-r--r-- | alot/commands/utils.py | 11 |
10 files changed, 87 insertions, 80 deletions
diff --git a/alot/commands/__init__.py b/alot/commands/__init__.py index 61ff7f21..e30769bb 100644 --- a/alot/commands/__init__.py +++ b/alot/commands/__init__.py @@ -1,15 +1,15 @@ # Copyright (C) 2011-2012 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file + import argparse import glob import logging import os import re -from ..settings.const import settings -from ..helper import split_commandstring - +from ..settings.const import settings +from ..helper import split_commandstring class Command: diff --git a/alot/commands/bufferlist.py b/alot/commands/bufferlist.py index d58fab91..3850e4e3 100644 --- a/alot/commands/bufferlist.py +++ b/alot/commands/bufferlist.py @@ -2,8 +2,9 @@ # Copyright © 2018 Dylan Baker # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file + +from . import globals from ..commands import Command, registerCommand -from . import globals MODE = 'bufferlist' diff --git a/alot/commands/common.py b/alot/commands/common.py index 4914933c..6ccc04a4 100644 --- a/alot/commands/common.py +++ b/alot/commands/common.py @@ -3,11 +3,9 @@ # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file -from . import Command - -from .globals import PromptCommand - -from ..settings.const import settings +from . import Command +from .globals import PromptCommand +from ..settings.const import settings class RetagPromptCommand(Command): diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py index 4b5a1fcc..52232a3c 100644 --- a/alot/commands/envelope.py +++ b/alot/commands/envelope.py @@ -2,6 +2,7 @@ # Copyright © 2018 Dylan Baker # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file + import argparse import datetime import email @@ -13,19 +14,19 @@ import tempfile import textwrap import traceback -from . import Command, registerCommand -from . import globals -from . import utils -from .. import buffers -from .. import commands -from .. import crypto -from ..account import SendingMailFailed, StoreMailError -from ..db.errors import DatabaseError -from ..errors import GPGProblem -from ..settings.const import settings -from ..settings.errors import NoMatchingAccount -from ..utils import argparse as cargparse -from ..utils.collections import OrderedSet +from . import Command, registerCommand +from . import globals +from . import utils +from .. import buffers +from .. import commands +from .. import crypto +from ..account import SendingMailFailed, StoreMailError +from ..db.errors import DatabaseError +from ..errors import GPGProblem +from ..settings.const import settings +from ..settings.errors import NoMatchingAccount +from ..utils import argparse as cargparse +from ..utils.collections import OrderedSet MODE = 'envelope' diff --git a/alot/commands/globals.py b/alot/commands/globals.py index 5304b32d..76ecc1f4 100644 --- a/alot/commands/globals.py +++ b/alot/commands/globals.py @@ -2,38 +2,39 @@ # Copyright © 2018 Dylan Baker # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file + import argparse +import asyncio import code import email import email.utils import glob +from io import BytesIO import logging import os -import subprocess -from io import BytesIO -import asyncio import shlex +import subprocess import urwid -from . import Command, registerCommand -from . import CommandCanceled -from .utils import update_keys -from .. import commands - -from .. import buffers -from .. import helper -from ..helper import split_commandstring -from ..completion.commandline import CommandLineCompleter -from ..completion.contacts import ContactsCompleter -from ..completion.accounts import AccountCompleter -from ..completion.tags import TagsCompleter -from ..db.sort import NAME as SORT_NAME -from ..widgets.utils import DialogBox -from ..mail.envelope import Envelope -from ..settings.const import settings -from ..settings.errors import ConfigError, NoMatchingAccount -from ..utils import argparse as cargparse +from . import Command, registerCommand +from . import CommandCanceled +from .utils import update_keys +from .. import commands + +from .. import buffers +from .. import helper +from ..completion.accounts import AccountCompleter +from ..completion.commandline import CommandLineCompleter +from ..completion.contacts import ContactsCompleter +from ..completion.tags import TagsCompleter +from ..db.sort import NAME as SORT_NAME +from ..helper import split_commandstring +from ..mail.envelope import Envelope +from ..settings.const import settings +from ..settings.errors import ConfigError, NoMatchingAccount +from ..utils import argparse as cargparse +from ..widgets.utils import DialogBox MODE = 'global' diff --git a/alot/commands/namedqueries.py b/alot/commands/namedqueries.py index e2bc301b..59a644ee 100644 --- a/alot/commands/namedqueries.py +++ b/alot/commands/namedqueries.py @@ -1,10 +1,11 @@ # Copyright (C) 2011-2018 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file + import argparse -from . import Command, registerCommand -from .globals import SearchCommand +from . import Command, registerCommand +from .globals import SearchCommand MODE = 'namedqueries' diff --git a/alot/commands/search.py b/alot/commands/search.py index 79aaee56..9cf0713c 100644 --- a/alot/commands/search.py +++ b/alot/commands/search.py @@ -2,17 +2,18 @@ # Copyright © 2018 Dylan Baker # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file + import argparse import logging -from . import Command, registerCommand -from .globals import PromptCommand -from .globals import MoveCommand -from .common import RetagPromptCommand -from .. import commands +from . import Command, registerCommand +from .globals import PromptCommand +from .globals import MoveCommand +from .common import RetagPromptCommand -from .. import buffers -from ..db.errors import DatabaseROError +from .. import buffers +from .. import commands +from ..db.errors import DatabaseROError from ..db.sort import NAME as SORT_NAME diff --git a/alot/commands/taglist.py b/alot/commands/taglist.py index f5e8af73..1df74d90 100644 --- a/alot/commands/taglist.py +++ b/alot/commands/taglist.py @@ -2,8 +2,9 @@ # Copyright © 2018 Dylan Baker # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file -from . import Command, registerCommand -from .globals import SearchCommand + +from . import Command, registerCommand +from .globals import SearchCommand MODE = 'taglist' diff --git a/alot/commands/thread.py b/alot/commands/thread.py index 0ff38b55..79e63167 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -2,39 +2,41 @@ # Copyright © 2018 Dylan Baker # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file + import argparse import asyncio +import email +import email.policy +from email.utils import getaddresses, parseaddr +from email.message import Message import logging import mailcap import os import subprocess import tempfile -import email -import email.policy -from email.utils import getaddresses, parseaddr -from email.message import Message import urwid -from urwid.util import detected_encoding +from urwid.util import detected_encoding from io import BytesIO -from . import Command, registerCommand -from .globals import ComposeCommand -from .globals import MoveCommand -from .globals import CommandCanceled -from .common import RetagPromptCommand -from .envelope import SendCommand -from ..completion.contacts import ContactsCompleter -from ..completion.path import PathCompleter -from ..mail.attachment import Attachment -from ..mail.envelope import Envelope -from ..db.errors import DatabaseROError -from ..settings.const import settings -from ..helper import formataddr -from ..helper import split_commandstring -from ..utils import argparse as cargparse -from ..utils.mailcap import MailcapHandler +from . import Command, registerCommand +from .common import RetagPromptCommand +from .envelope import SendCommand +from .globals import ComposeCommand +from .globals import MoveCommand +from .globals import CommandCanceled + +from ..completion.contacts import ContactsCompleter +from ..completion.path import PathCompleter +from ..db.errors import DatabaseROError +from ..helper import formataddr +from ..helper import split_commandstring +from ..mail.attachment import Attachment +from ..mail.envelope import Envelope +from ..settings.const import settings +from ..utils import argparse as cargparse +from ..utils.mailcap import MailcapHandler MODE = 'thread' diff --git a/alot/commands/utils.py b/alot/commands/utils.py index 57c52d35..8f76d756 100644 --- a/alot/commands/utils.py +++ b/alot/commands/utils.py @@ -1,13 +1,14 @@ # Copyright (C) 2015 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file -import re + import logging +import re -from ..errors import GPGProblem, GPGCode -from ..settings.const import settings -from ..settings.errors import NoMatchingAccount -from .. import crypto +from .. import crypto +from ..errors import GPGProblem, GPGCode +from ..settings.const import settings +from ..settings.errors import NoMatchingAccount async def update_keys(ui, envelope, block_error=False, signed_only=False): |