Merge "Removed all __init__ files from pep8 ignore"

This commit is contained in:
Jenkins 2016-02-02 14:03:50 +00:00 committed by Gerrit Code Review
commit a303646625
10 changed files with 94 additions and 16 deletions

View File

@ -1 +1,14 @@
from solar.dblayer import standalone_session_wrapper
# -*- coding: utf-8 -*-
# Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

View File

@ -12,4 +12,20 @@
# License for the specific language governing permissions and limitations
# under the License.
from .resource import Resource, load, load_all, validate_resources, load_by_tags, load_updated, RESOURCE_STATE
from solar.core.resource.resource import load
from solar.core.resource.resource import load_all
from solar.core.resource.resource import load_by_tags
from solar.core.resource.resource import load_updated
from solar.core.resource.resource import Resource
from solar.core.resource.resource import RESOURCE_STATE
from solar.core.resource.resource import validate_resources
__all__ = [
'RESOURCE_STATE',
'Resource',
'load',
'load_all',
'load_by_tags',
'load_updated',
'validate_resources'
]

View File

@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
# Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

View File

@ -1 +1,13 @@
# Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

View File

@ -1,13 +1,29 @@
# -*- coding: utf-8 -*-
# Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
try:
from gevent import monkey
from gevent import monkey # NOQA
except ImportError:
pass
else:
from solar.dblayer.gevent_patches import patch_all
patch_all()
from solar.dblayer.model import ModelMeta
from solar.config import C
from solar.dblayer.model import ModelMeta
from solar.utils import parse_database_conn
_connection, _connection_details = parse_database_conn(C.solar_db)

View File

@ -12,4 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from .api import *
from solar.events.api import add_dep
from solar.events.api import add_event
from solar.events.api import add_react
from solar.events.api import Dep
from solar.events.api import React
__all__ = ['add_dep', 'add_react', 'Dep', 'React', 'add_event']

View File

@ -15,8 +15,8 @@
from solar.config import C
from solar.core.log import log
from solar.dblayer import ModelMeta
from solar.orchestration import extensions as loader
from solar.orchestration.executors import Executor
from solar.orchestration import extensions as loader
SCHEDULER_CLIENT = loader.get_client('scheduler')

View File

@ -19,10 +19,10 @@ from solar.config import C
mgr = driver.DriverManager(
namespace='solar.orchestration.executors',
name=C.executor,
invoke_on_load=False,
)
namespace='solar.orchestration.executors',
name=C.executor,
invoke_on_load=False,
)
Client = mgr.driver.Client
Executor = mgr.driver.Executor

View File

@ -12,6 +12,6 @@
# License for the specific language governing permissions and limitations
# under the License.
import solar.orchestration.workers.scheduler
import solar.orchestration.workers.system_log
import solar.orchestration.workers.tasks
import solar.orchestration.workers.scheduler # NOQA
import solar.orchestration.workers.system_log # NOQA
import solar.orchestration.workers.tasks # NOQA

View File

@ -72,8 +72,8 @@ envdir = devenv
usedevelop = True
[flake8]
ignore = H101,H236,E731,H405
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,__init__.py,docs,solar/ansible_library
ignore = H101,H236,E731,H405,H104
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,docs,solar/ansible_library
show-pep8 = True
show-source = True
count = True