Skip to content

Commit

Permalink
Sort imports by running isort
Browse files Browse the repository at this point in the history
This change was done by running:

  isort -rc e3 && isort -rc tests

Closes AdaCore#15
  • Loading branch information
enzbang committed Nov 26, 2016
1 parent 6895535 commit f3ed5b7
Show file tree
Hide file tree
Showing 82 changed files with 278 additions and 308 deletions.
19 changes: 9 additions & 10 deletions e3/anod/buildspace.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
from __future__ import absolute_import
from __future__ import print_function
from __future__ import absolute_import, division, print_function

import os
import sys
import logging
import logging.handlers
import yaml
import os
import sys
from datetime import datetime as dt
from yaml.reader import ReaderError
from yaml.parser import ParserError

import e3.error
import e3.log
import e3.os.process
from e3.hash import sha1
import yaml
from e3.anod.error import AnodError
from e3.anod.fingerprint import Fingerprint
from e3.anod.status import ReturnValue
from e3.anod.error import AnodError
from e3.fs import mkdir, rm

from e3.hash import sha1
from yaml.parser import ParserError
from yaml.reader import ReaderError

logger = e3.log.getLogger('buildspace')

Expand Down
19 changes: 9 additions & 10 deletions e3/anod/context.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
from __future__ import absolute_import
from __future__ import absolute_import, division, print_function

from e3.collection.dag import DAG
from e3.anod.action import (Build, BuildOrInstall, Checkout, CreateSource,
CreateSourceOrDownload, Decision, DownloadBinary,
DownloadSource, GetSource, Install,
InstallSource, Root, Test, UploadBinaryComponent,
UploadComponent, UploadSourceComponent)
from e3.anod.deps import Dependency
from e3.anod.error import AnodError
from e3.anod.package import UnmanagedSourceBuilder
from e3.anod.spec import has_primitive
from e3.collection.dag import DAG
from e3.env import BaseEnv
from e3.error import E3Error
from e3.anod.spec import has_primitive
from e3.anod.package import UnmanagedSourceBuilder
from e3.anod.action import (Root, InstallSource, CreateSource, Checkout,
DownloadSource, GetSource, Build, Test, Install,
DownloadBinary, Decision, BuildOrInstall,
UploadComponent, UploadBinaryComponent,
UploadSourceComponent,
CreateSourceOrDownload)


class SchedulingError(E3Error):
Expand Down
4 changes: 2 additions & 2 deletions e3/anod/deps.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import absolute_import
from __future__ import print_function
from __future__ import absolute_import, division, print_function

import collections

import e3.anod.error
from e3.env import BaseEnv

Expand Down
11 changes: 4 additions & 7 deletions e3/anod/driver.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
from __future__ import absolute_import
from __future__ import print_function
from __future__ import absolute_import, division, print_function

from functools import wraps
import os
import sys

from e3.error import E3Error

from e3.anod.spec import AnodError, has_primitive
from functools import wraps

import e3.log
import e3.store
from e3.anod.spec import AnodError, has_primitive
from e3.error import E3Error

logger = e3.log.getLogger('e3.anod.driver')

Expand Down
3 changes: 2 additions & 1 deletion e3/anod/error.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from __future__ import absolute_import
from __future__ import absolute_import, division, print_function

import e3.error


Expand Down
8 changes: 4 additions & 4 deletions e3/anod/fingerprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
decide if a given action has been done and is up-to-date.
"""

from __future__ import absolute_import
from __future__ import absolute_import, division, print_function

import hashlib
import os
from collections import OrderedDict

from e3.anod.error import AnodError
from e3.env import Env
from e3.hash import sha1

import os
import hashlib

FINGERPRINT_VERSION = '1.1'
# This value should be bumped each time computation of the fingerprint changes.
# This ensures we don't try to compare fingerprints with different meanings.
Expand Down
20 changes: 9 additions & 11 deletions e3/anod/helper.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
"""Helpers classes and functions for ANOD."""

from __future__ import absolute_import
import e3.log
from e3.anod.spec import parse_command
from e3.anod.error import AnodError
from e3.fs import find
from e3.fs import rm
from e3.os.fs import unixpath
from e3.yaml import custom_repr

from StringIO import StringIO
from __future__ import absolute_import, division, print_function

import io
import os
import re
import yaml
from StringIO import StringIO

import e3.log
import yaml
from e3.anod.error import AnodError
from e3.anod.spec import parse_command
from e3.fs import find, rm
from e3.os.fs import unixpath
from e3.yaml import custom_repr

log = e3.log.getLogger('anod.helpers')

Expand Down
11 changes: 5 additions & 6 deletions e3/anod/loader.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
from __future__ import absolute_import
from __future__ import print_function
from __future__ import absolute_import, division, print_function

import imp
import inspect
import os
import sys

from e3.anod.error import SandBoxError
from e3.fs import ls
import e3.hash
import e3.log
import os
import sys
from e3.anod.error import SandBoxError
from e3.fs import ls

logger = e3.log.getLogger('anod.loader')

Expand Down
3 changes: 1 addition & 2 deletions e3/anod/package.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from __future__ import absolute_import
from __future__ import print_function
from __future__ import absolute_import, division, print_function

import e3.anod.error
import e3.diff
Expand Down
5 changes: 2 additions & 3 deletions e3/anod/sandbox/action.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
from __future__ import absolute_import
from __future__ import print_function
from __future__ import absolute_import, division, print_function

import abc
import argparse

import e3.log
from e3.fs import mkdir
from e3.anod.sandbox import SandBox, SandBoxError
from e3.anod.sandbox.main import main
from e3.fs import mkdir
from e3.vcs.git import GitRepository


Expand Down
5 changes: 2 additions & 3 deletions e3/anod/sandbox/main.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from __future__ import absolute_import
from __future__ import print_function
from __future__ import absolute_import, division, print_function

import stevedore
import e3.log
import stevedore
from e3.main import Main


Expand Down
3 changes: 1 addition & 2 deletions e3/anod/sandbox/scripts.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from __future__ import absolute_import
from __future__ import print_function
from __future__ import absolute_import, division, print_function

from e3.anod.error import AnodError
from e3.main import Main
Expand Down
11 changes: 5 additions & 6 deletions e3/anod/spec.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
from __future__ import absolute_import
from __future__ import print_function
from __future__ import absolute_import, division, print_function

import os
from collections import OrderedDict

from e3.anod.error import AnodError, ShellError
from e3.anod.status import ReturnValue
from e3.yaml import load_with_config
import e3.anod.deps
import e3.anod.package
import yaml
import e3.env
import e3.log
import e3.os.process
import e3.text
import yaml
from e3.anod.error import AnodError, ShellError
from e3.anod.status import ReturnValue
from e3.yaml import load_with_config

# CURRENT API version
__version__ = '1.4'
Expand Down
3 changes: 1 addition & 2 deletions e3/anod/status.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from __future__ import absolute_import
from __future__ import print_function
from __future__ import absolute_import, division, print_function

from enum import Enum

Expand Down
5 changes: 2 additions & 3 deletions e3/archive.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
"""Support for reading and writing tar and zip archives."""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import absolute_import, division, print_function

from contextlib import closing
import fnmatch
import os
import subprocess
import sys
import tempfile
from contextlib import closing

import e3
import e3.error
Expand Down
14 changes: 7 additions & 7 deletions e3/binarydata/elf.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""Basic ELF reader."""

from __future__ import absolute_import
from __future__ import print_function
from e3.binarydata import UChar, UInt16, BinaryData, UInt32, \
CharStr, Address, Offset, UIntMax, Field, StructType, String, \
FieldArray, FieldNullTerminatedArray, \
BinaryFileBuffer
from os.path import dirname, join, isfile
from __future__ import absolute_import, division, print_function

from os.path import dirname, isfile, join

from e3.binarydata import (Address, BinaryData, BinaryFileBuffer, CharStr,
Field, FieldArray, FieldNullTerminatedArray, Offset,
String, StructType, UChar, UInt16, UInt32, UIntMax)

E_TYPE_STR = {
0: 'No file type',
Expand Down
3 changes: 1 addition & 2 deletions e3/binarydata/macho.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from __future__ import absolute_import
from __future__ import print_function
from __future__ import absolute_import, division, print_function

import os
import re
Expand Down
4 changes: 2 additions & 2 deletions e3/collection/dag.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Implementation of Direct Acyclic Graphs."""

from __future__ import absolute_import
from __future__ import print_function
from __future__ import absolute_import, division, print_function

from e3.error import E3Error


Expand Down
3 changes: 1 addition & 2 deletions e3/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
to enable/disable a function, to memoize a function results...
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import absolute_import, division, print_function

from functools import partial

Expand Down
3 changes: 1 addition & 2 deletions e3/diff.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from __future__ import absolute_import
from __future__ import print_function
from __future__ import absolute_import, division, print_function

import fnmatch
import re
Expand Down
4 changes: 1 addition & 3 deletions e3/electrolyt/hosts.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from __future__ import absolute_import
from __future__ import print_function
from __future__ import absolute_import, division, print_function

import yaml

from e3.env import BaseEnv


Expand Down
7 changes: 3 additions & 4 deletions e3/electrolyt/plans.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
from __future__ import absolute_import
from __future__ import print_function
from __future__ import absolute_import, division, print_function

import ast
import imp
import inspect
import ast

from functools import partial

from e3.env import BaseEnv


Expand Down
3 changes: 1 addition & 2 deletions e3/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
This package provide a class called Env used to store global
information. Env is a singleton so there is in fact only one instance.
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import absolute_import, division, print_function

import abc
import os
Expand Down
3 changes: 1 addition & 2 deletions e3/error.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from __future__ import absolute_import
from __future__ import print_function
from __future__ import absolute_import, division, print_function


class E3Error(Exception):
Expand Down
6 changes: 2 additions & 4 deletions e3/event/backends/base.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
from __future__ import absolute_import
from __future__ import print_function
from __future__ import absolute_import, division, print_function

import abc
import uuid

from e3.error import E3Error

import e3.env
import e3.hash
from e3.error import E3Error


class Event(object):
Expand Down
11 changes: 5 additions & 6 deletions e3/event/backends/smtp.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
from __future__ import absolute_import
import mimetypes
import json
from __future__ import absolute_import, division, print_function

import json
import mimetypes
from email import encoders
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
from email.utils import make_msgid, formatdate

from e3.event.backends.base import Event, EventManager
from email.utils import formatdate, make_msgid

import e3.net.smtp
from e3.event.backends.base import Event, EventManager


class SMTPEvent(Event):
Expand Down
Loading

0 comments on commit f3ed5b7

Please sign in to comment.