Skip to content

Commit

Permalink
Fix unused imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
Omer Katz committed Dec 5, 2019
1 parent 34ebad0 commit 778ef8e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 14 deletions.
37 changes: 26 additions & 11 deletions celery/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,36 @@
"""
from __future__ import absolute_import, print_function, unicode_literals

from kombu.utils.objects import cached_property # noqa: F401
from kombu.utils.uuid import uuid # noqa: F401
from kombu.utils.objects import cached_property
from kombu.utils.uuid import uuid

from .functional import chunks, noop
from .imports import gen_task_name, import_from_cwd, instantiate # noqa: F401
from .imports import qualname as get_full_cls_name # noqa: F401
from .imports import symbol_by_name as get_cls_by_name # noqa: F401
from .functional import memoize
from .imports import gen_task_name, import_from_cwd, instantiate
from .imports import qualname as get_full_cls_name
from .imports import symbol_by_name as get_cls_by_name
# ------------------------------------------------------------------------ #
# > XXX Compat
from .log import LOG_LEVELS # noqa
from .log import LOG_LEVELS
from .nodenames import nodename, nodesplit, worker_direct

from .functional import memoize # noqa: F401; noqa: F401

__all__ = ('worker_direct', 'gen_task_name', 'nodename', 'nodesplit',
'cached_property', 'uuid')

gen_unique_id = uuid

__all__ = (
'LOG_LEVELS',
'cached_property',
'chunks',
'gen_task_name',
'gen_task_name',
'gen_unique_id',
'get_cls_by_name',
'get_full_cls_name',
'import_from_cwd',
'instantiate',
'memoize',
'nodename',
'nodesplit',
'noop',
'uuid',
'worker_direct'
)
3 changes: 1 addition & 2 deletions celery/utils/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@
from kombu.utils.encoding import safe_str

from celery.five import string_t, text_t

from .term import colored

__all__ = (
'ColorFormatter', 'LoggingProxy', 'base_logger',
'set_in_sighandler', 'in_sighandler', 'get_logger',
'get_task_logger', 'mlevel',
'get_multiprocessing_logger', 'reset_multiprocessing_logger',
'get_multiprocessing_logger', 'reset_multiprocessing_logger', 'LOG_LEVELS'
)

_process_aware = False
Expand Down
2 changes: 1 addition & 1 deletion t/unit/tasks/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def test_retry(self):

def test_retry_priority(self):
priority = 7

# Technically, task.priority doesn't need to be set here
# since push_request() doesn't populate the delivery_info
# with it. However, setting task.priority here also doesn't
Expand Down

0 comments on commit 778ef8e

Please sign in to comment.