mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
python: cleanup imports
Drop unused imports, and avoid warning about unused imports when we import something on behalf of another module. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
This commit is contained in:
parent
096c600b96
commit
a5c1536d9a
4 changed files with 9 additions and 2 deletions
|
@ -65,3 +65,7 @@ else:
|
|||
raise TypeError('Expected str, got %s' % type(value))
|
||||
|
||||
return value.encode('utf-8', 'replace')
|
||||
|
||||
# We import the SafeConfigParser class on behalf of other code to cope
|
||||
# with the differences between Python 2 and 3.
|
||||
SafeConfigParser # avoid warning about unused import
|
||||
|
|
|
@ -36,7 +36,6 @@ from .errors import (
|
|||
NotmuchError,
|
||||
NullPointerError,
|
||||
NotInitializedError,
|
||||
ReadOnlyDatabaseError,
|
||||
)
|
||||
from .message import Message
|
||||
from .tag import Tags
|
||||
|
|
|
@ -19,7 +19,6 @@ Copyright 2010 Sebastian Spaeth <Sebastian@SSpaeth.de>
|
|||
from ctypes import c_char_p
|
||||
from .globals import (
|
||||
nmlib,
|
||||
NotmuchMessageP,
|
||||
NotmuchFilenamesP,
|
||||
Python3StringMixIn,
|
||||
)
|
||||
|
|
|
@ -33,6 +33,11 @@ except:
|
|||
|
||||
from .compat import Python3StringMixIn, encode_utf8 as _str
|
||||
|
||||
# We import these on behalf of other modules. Silence warning about
|
||||
# these symbols not being used.
|
||||
Python3StringMixIn
|
||||
_str
|
||||
|
||||
class Enum(object):
|
||||
"""Provides ENUMS as "code=Enum(['a','b','c'])" where code.a=0 etc..."""
|
||||
def __init__(self, names):
|
||||
|
|
Loading…
Reference in a new issue