Fixes some PEP8 and minor stuff

This commit is contained in:
Frederic Guillot 2016-03-25 11:52:20 -04:00
parent 27abb148bd
commit b817a17aa6
12 changed files with 20 additions and 12 deletions

1
.gitignore vendored
View File

@ -4,7 +4,6 @@
*.pyc *.pyc
*.coverage *.coverage
*.egg* *.egg*
.vagrant
.DS_Store .DS_Store
AUTHORS AUTHORS
ChangeLog ChangeLog

View File

@ -15,3 +15,8 @@ Almanach is composed of two parts:
- **Collector**: listen for OpenStack events and store the relevant information in the database. - **Collector**: listen for OpenStack events and store the relevant information in the database.
- **REST API**: Expose the information collected to external systems. - **REST API**: Expose the information collected to external systems.
License
-------
Almanach is distributed under Apache 2.0 LICENSE.

View File

@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
import logging import logging
import pymongo import pymongo
from pymongo.errors import ConfigurationError from pymongo.errors import ConfigurationError

View File

@ -14,6 +14,7 @@
import json import json
import logging import logging
from kombu import Exchange, Queue, Producer from kombu import Exchange, Queue, Producer
from almanach import config from almanach import config

View File

@ -13,6 +13,7 @@
# limitations under the License. # limitations under the License.
import logging import logging
from flask import Flask from flask import Flask
from gunicorn.app.base import Application from gunicorn.app.base import Application

View File

@ -14,6 +14,7 @@
import logging import logging
import sys import sys
from kombu import Connection from kombu import Connection
from almanach import log_bootstrap from almanach import log_bootstrap

View File

@ -18,12 +18,13 @@ import mongomock
from datetime import datetime from datetime import datetime
from flexmock import flexmock, flexmock_teardown from flexmock import flexmock, flexmock_teardown
from hamcrest import assert_that, contains_inanyorder from hamcrest import assert_that, contains_inanyorder
from pymongo import MongoClient
from almanach.adapters.database_adapter import DatabaseAdapter from almanach.adapters.database_adapter import DatabaseAdapter
from almanach.common.VolumeTypeNotFoundException import VolumeTypeNotFoundException from almanach.common.VolumeTypeNotFoundException import VolumeTypeNotFoundException
from almanach.common.AlmanachException import AlmanachException from almanach.common.AlmanachException import AlmanachException
from almanach import config from almanach import config
from almanach.core.model import todict from almanach.core.model import todict
from pymongo import MongoClient
from tests.builder import a, instance, volume, volume_type from tests.builder import a, instance, volume, volume_type

View File

@ -13,13 +13,14 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
from kombu import Connection from kombu import Connection
from kombu.tests import mocks
from kombu.transport import pyamqp
from flexmock import flexmock, flexmock_teardown from flexmock import flexmock, flexmock_teardown
from almanach import config from almanach import config
from almanach.adapters.retry_adapter import RetryAdapter from almanach.adapters.retry_adapter import RetryAdapter
from kombu.tests import mocks
from kombu.transport import pyamqp
class BusAdapterTest(unittest.TestCase): class BusAdapterTest(unittest.TestCase):

View File

@ -13,10 +13,9 @@
# limitations under the License. # limitations under the License.
import json import json
from uuid import uuid4
import flask import flask
from uuid import uuid4
from unittest import TestCase from unittest import TestCase
from datetime import datetime from datetime import datetime
from flexmock import flexmock, flexmock_teardown from flexmock import flexmock, flexmock_teardown

View File

@ -12,13 +12,13 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from copy import copy import pytz
from copy import copy
from datetime import datetime from datetime import datetime
from uuid import uuid4 from uuid import uuid4
from almanach.core.model import build_entity_from_dict, Instance, Volume, VolumeType from almanach.core.model import build_entity_from_dict, Instance, Volume, VolumeType
import pytz
class Builder(object): class Builder(object):

View File

@ -13,9 +13,9 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
from datetime import datetime, timedelta
import pytz import pytz
from datetime import datetime, timedelta
from dateutil import parser as date_parser from dateutil import parser as date_parser
from flexmock import flexmock, flexmock_teardown from flexmock import flexmock, flexmock_teardown
from nose.tools import assert_raises from nose.tools import assert_raises

View File

@ -12,10 +12,11 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from datetime import datetime, timedelta
import dateutil.parser import dateutil.parser
import pytz import pytz
from datetime import datetime, timedelta
DEFAULT_VOLUME_TYPE = "5dadd67f-e21e-4c13-b278-c07b73b21250" DEFAULT_VOLUME_TYPE = "5dadd67f-e21e-4c13-b278-c07b73b21250"