Skip to content
Snippets Groups Projects
Commit 4fd17776 authored by Pavel Kácha's avatar Pavel Kácha
Browse files

Cosmetic move __all__ under imports

parent ebd32221
No related branches found
No related tags found
No related merge requests found
......@@ -4,8 +4,6 @@
from __future__ import absolute_import, division, print_function, unicode_literals
__all__ = ["cast_boolean", "cast_path_list", "cfg_item", "cfg_section", "cfg_root", "cfg_base_config", "gather"]
import optparse
import typedcols
import json
......@@ -14,6 +12,8 @@ from collections import OrderedDict, deque
from shlex import shlex
from .movement import basestring
__all__ = ["cast_boolean", "cast_path_list", "cfg_item", "cfg_section", "cfg_root", "cfg_base_config", "gather"]
def cast_boolean(v):
""" Translate user provided text into boolean. """
try:
......
......@@ -4,8 +4,6 @@
from __future__ import absolute_import, division, print_function, unicode_literals
__all__ = ["daemon_base_config", "detach"]
import sys
import os
import os.path as pth
......@@ -14,6 +12,8 @@ import atexit
import logging
from . import conf
__all__ = ["daemon_base_config", "detach"]
#: Daemon configuration insert
daemon_base_config = [
conf.cfg_item("daemonize", conf.cast_boolean, "Run as daemon", default="Yes"),
......
......@@ -4,8 +4,6 @@
from __future__ import absolute_import, division, print_function, unicode_literals
__all__ = ["IPtoPTR"]
import socket
import dns.message, dns.rdatatype, dns.rdataclass, dns.rcode, dns.resolver
import select
......@@ -15,6 +13,7 @@ import ipranges
from operator import itemgetter
from .movement import Cog, itemsetter, dummy_escapement
__all__ = ["IPtoPTR"]
class _QueryStateRecord(object):
__slots__ = ("attempts", "events")
......
......@@ -4,8 +4,6 @@
from __future__ import absolute_import, division, print_function, unicode_literals
__all__ = ["FileWatcherSupply", "LineFileDrain", "FilerSupply", "FilerDrain"]
import os
import os.path as pth
import codecs
......@@ -16,6 +14,7 @@ import errno
from operator import itemgetter
from .movement import Object, Cog, itemsetter, uuidsetter, dummy_escapement, INotify
__all__ = ["FileWatcherSupply", "LineFileDrain", "FilerSupply", "FilerDrain"]
class _WatchedFileRecord(Object):
......
......@@ -4,14 +4,14 @@
from __future__ import absolute_import, division, print_function, unicode_literals
__all__ = ["cast_ip_range_list", "anonymise_base_config", "IdeaAnonymise", "filter_base_config", "FilterBase", "IPFilter"]
import ipranges
import shlex
from . import conf
from operator import itemgetter
from .movement import Cog, basestring
__all__ = ["cast_ip_range_list", "anonymise_base_config", "IdeaAnonymise", "filter_base_config", "FilterBase", "IPFilter"]
def cast_ip_range_list(l):
""" Translate comma separated list of IP addresses into list of ipranges objects. """
if isinstance(l, basestring):
......
......@@ -4,8 +4,6 @@
from __future__ import absolute_import, division, print_function, unicode_literals
__all__ = ["cast_loglevel", "cast_facility", "log_type", "log_base_config", "configure"]
import sys
import os
import stat
......@@ -15,6 +13,8 @@ import logging.handlers
import os.path as pth
from . import conf
__all__ = ["cast_loglevel", "cast_facility", "log_type", "log_base_config", "configure"]
_usual_sockets = ["/var/run/log", "/var/run/syslog", "/dev/log"]
_form = "%(name)s[%(process)d]: (%(levelname)s) %(methodName)s %(message)s"
_form_time = "%(asctime)s " + _form
......
......@@ -4,14 +4,6 @@
from __future__ import absolute_import, division, print_function, unicode_literals
__all__ = [
"Object", "Cog", "DummyEscapement", "Escapement", "Train", "INotify",
"train_split", "train_line",
"itemsetter", "nullsetter", "constgetter", "uuidsetter",
"basestring", "string_types",
"catch", "setn", "appendn"
]
import time
import operator
import heapq
......@@ -29,6 +21,14 @@ import logging
from collections import namedtuple, deque, Mapping, defaultdict
from operator import itemgetter
__all__ = [
"Object", "Cog", "DummyEscapement", "Escapement", "Train", "INotify",
"train_split", "train_line",
"itemsetter", "nullsetter", "constgetter", "uuidsetter",
"basestring", "string_types",
"catch", "setn", "appendn"
]
# Compatibility helpers
try:
......
......@@ -4,11 +4,6 @@
from __future__ import absolute_import, division, print_function, unicode_literals
__all__ = [
"StringLexicon", "rrule", "LinearRegexpLexicon", "RegexpLexicon",
"CSVParse", "CSVMarshall", "JSONParse", "JSONMarshall", "JinjaMarshall"
]
import re
import csv
import json
......@@ -16,6 +11,11 @@ from collections import namedtuple
from operator import itemgetter
from .movement import Cog, nullsetter, itemsetter
__all__ = [
"StringLexicon", "rrule", "LinearRegexpLexicon", "RegexpLexicon",
"CSVParse", "CSVMarshall", "JSONParse", "JSONMarshall", "JinjaMarshall"
]
class StringLexicon(Cog):
""" Cog, which enriches data based on constant set of dictionary values. """
......
......@@ -4,10 +4,6 @@
from __future__ import absolute_import, division, print_function, unicode_literals
__all__ = [
"Normalize", "ImperativeTransform", "WindowContextMgr"
]
import sys
import logging
from collections import Sequence, Mapping
......@@ -15,6 +11,10 @@ from operator import itemgetter
from typedcols import TypedDict, typed_dict
from .movement import Cog
__all__ = [
"Normalize", "ImperativeTransform", "WindowContextMgr"
]
class Normalize(Cog):
""" Cog for type conversion/normalizaton.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment