-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix module interface definitions (#969)
Removes flake8 F403 and F401 ignores from module __init__.py files and adds __all__ definitions for module interfaces.
- Loading branch information
Showing
17 changed files
with
162 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,61 @@ | ||
from .cli import ( # noqa: F403,F401 | ||
from .cli import ( | ||
CLIHelper, | ||
CLIHelperFile, | ||
) | ||
from .config import ( # noqa: F403,F401 | ||
from .config import ( | ||
ConfigBase, | ||
IniConfigBase, | ||
) | ||
from .network import ( # noqa: F403,F401 | ||
from .network import ( | ||
NetworkPort, | ||
HostNetworkingHelper, | ||
) | ||
from .packaging import ( # noqa: F403,F401 | ||
from .packaging import ( | ||
DPKGVersion, | ||
APTPackageHelper, | ||
DockerImageHelper, | ||
SnapPackageHelper, | ||
) | ||
from .pebble import ( # noqa: F403,F401 pylint: disable=cyclic-import | ||
from .pebble import ( # pylint: disable=cyclic-import | ||
PebbleHelper, | ||
) | ||
from .ssl import ( # noqa: F403,F401 | ||
from .ssl import ( | ||
SSLCertificate, | ||
SSLCertificatesHelper, | ||
) | ||
from .systemd import ( # noqa: F403,F401 pylint: disable=cyclic-import | ||
from .systemd import ( # pylint: disable=cyclic-import | ||
SystemdHelper, | ||
) | ||
from .uptime import ( # noqa: F403,F401 pylint: disable=cyclic-import | ||
from .uptime import ( # pylint: disable=cyclic-import | ||
UptimeHelper, | ||
) | ||
from .sysctl import ( # noqa: F403,F401 | ||
from .sysctl import ( | ||
SYSCtlFactory, | ||
SYSCtlConfHelper, | ||
) | ||
from .apparmor import ( # noqa: F403,F401 | ||
from .apparmor import ( | ||
AAProfileFactory, | ||
ApparmorHelper, | ||
) | ||
|
||
__all__ = [ | ||
CLIHelper.__name__, | ||
CLIHelperFile.__name__, | ||
ConfigBase.__name__, | ||
IniConfigBase.__name__, | ||
NetworkPort.__name__, | ||
HostNetworkingHelper.__name__, | ||
DPKGVersion.__name__, | ||
APTPackageHelper.__name__, | ||
DockerImageHelper.__name__, | ||
SnapPackageHelper.__name__, | ||
PebbleHelper.__name__, | ||
SSLCertificate.__name__, | ||
SSLCertificatesHelper.__name__, | ||
SystemdHelper.__name__, | ||
UptimeHelper.__name__, | ||
SYSCtlFactory.__name__, | ||
SYSCtlConfHelper.__name__, | ||
AAProfileFactory.__name__, | ||
ApparmorHelper.__name__, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
from .issue_types import * # noqa: F403,F401 | ||
from .utils import ( # noqa: F403,F401 | ||
from .utils import ( | ||
IssuesManager, | ||
IssueContext, | ||
) | ||
|
||
__all__ = [ | ||
IssuesManager.__name__, | ||
IssueContext.__name__, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
from .common import JujuChecks # noqa: F403,F401 | ||
from .resources import JujuBinaryInterface # noqa: F403,F401 | ||
from .common import JujuChecks | ||
from .resources import JujuBinaryInterface | ||
|
||
__all__ = [ | ||
JujuChecks.__name__, | ||
JujuBinaryInterface.__name__, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
from .common import KernelBase # noqa: F403,F401 | ||
from .config import SystemdConfig # noqa: F403,F401 | ||
from .kernlog import CallTraceManager # noqa: F403,F401 | ||
from .common import KernelBase | ||
from .config import SystemdConfig | ||
from .kernlog import CallTraceManager | ||
|
||
__all__ = [ | ||
CallTraceManager.__name__, | ||
KernelBase.__name__, | ||
SystemdConfig.__name__, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
from .calltrace import CallTraceManager # noqa: F403,F401 | ||
from .events import KernLogEvents # noqa: F403,F401 | ||
from .calltrace import CallTraceManager | ||
from .events import KernLogEvents | ||
|
||
__all__ = [ | ||
CallTraceManager.__name__, | ||
KernLogEvents.__name__, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
from .common import LXD, LXDChecks # noqa: F403,F401 | ||
from .common import LXD, LXDChecks | ||
|
||
__all__ = [ | ||
LXD.__name__, | ||
LXDChecks.__name__, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
from .common import ( # noqa: F403,F401 | ||
from .common import ( | ||
OpenstackBase, | ||
OpenStackChecks, | ||
OpenstackEventHandlerBase, | ||
OpenstackEventCallbackBase, | ||
) | ||
from .openstack import OpenstackConfig # noqa: F403,F401 | ||
from .openstack import OpenstackConfig | ||
|
||
__all__ = [ | ||
OpenstackBase.__name__, | ||
OpenStackChecks.__name__, | ||
OpenstackConfig.__name__, | ||
OpenstackEventHandlerBase.__name__, | ||
OpenstackEventCallbackBase.__name__, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
from .common import OpenvSwitchChecks # noqa: F403,F401 | ||
from .ovs import ( # noqa: F403,F401 | ||
from .common import OpenvSwitchChecks | ||
from .ovs import ( | ||
OpenvSwitchBase, | ||
OVSBFD, | ||
OVSDB, | ||
OVSDPLookups, | ||
OVSBridge, | ||
OVSDPDK, | ||
) | ||
|
||
__all__ = [ | ||
OpenvSwitchChecks.__name__, | ||
OpenvSwitchBase.__name__, | ||
OVSBFD.__name__, | ||
OVSBridge.__name__, | ||
OVSDB.__name__, | ||
OVSDPDK.__name__, | ||
OVSDPLookups.__name__, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
from .common import RabbitMQChecks # noqa: F403,F401 | ||
from .report import RabbitMQReport # noqa: F403,F401 | ||
from .common import RabbitMQChecks | ||
from .report import RabbitMQReport | ||
|
||
__all__ = [ | ||
RabbitMQChecks.__name__, | ||
RabbitMQReport.__name__, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
from .common import CephChecks, CephConfig, CephDaemonAllOSDsFactory | ||
from .cluster import CephCluster, CephCrushMap | ||
|
||
__all__ = [CephChecks.__name__, | ||
CephConfig.__name__, | ||
CephDaemonAllOSDsFactory.__name__, | ||
CephCluster.__name__, | ||
CephCrushMap.__name__] | ||
__all__ = [ | ||
CephChecks.__name__, | ||
CephConfig.__name__, | ||
CephDaemonAllOSDsFactory.__name__, | ||
CephCluster.__name__, | ||
CephCrushMap.__name__ | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
from .common import SystemBase, SystemChecks # noqa: F403,F401 | ||
from .common import SystemBase, SystemChecks | ||
|
||
__all__ = [ | ||
SystemBase.__name__, | ||
SystemChecks.__name__, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
from .engine.common import YDefsLoader # noqa: F403,F401 | ||
from .engine.common import YDefsLoader | ||
|
||
__all__ = [ | ||
YDefsLoader.__name__, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
from .common import ( # noqa: F403,F401 | ||
from .common import ( | ||
YDefsLoader, | ||
YHandlerBase, | ||
) | ||
from .properties import YDefsSection # noqa: F403,F401 | ||
from .properties import YDefsSection | ||
|
||
__all__ = [ | ||
YDefsLoader.__name__, | ||
YHandlerBase.__name__, | ||
YDefsSection.__name__, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
# the following are done to allow the decorators to do their thing | ||
# The following check property modules need to be imported so that the property | ||
# classes within them get autoregistered. We do not add them to the interface | ||
# list for this module since they are not accessed that way. | ||
from hotsos.core.ycheck.engine.properties import ( # noqa: F403,F401 | ||
checks, | ||
conclusions, | ||
inputdef, | ||
search, | ||
vardef, | ||
) | ||
import hotsos.core.ycheck.engine.properties.requires.requires # noqa:F403,F401 | ||
from hotsos.core.ycheck.engine.properties.requires.types import ( \ | ||
# noqa:F403,F401 | ||
config, | ||
) | ||
from hotsos.core.ycheck.engine.properties.common import YDefsSection | ||
|
||
|
||
from .common import YDefsSection # noqa: F403,F401 | ||
__all__ = [ | ||
YDefsSection.__name__, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,21 @@ | ||
from . import ( # noqa: F401 | ||
from . import ( | ||
summary, | ||
service_features, | ||
service_network_checks, | ||
vm_info, | ||
nova_external_events, | ||
) | ||
from .agent import ( # noqa: F403,F401 | ||
from .agent import ( | ||
events, | ||
exceptions, | ||
) | ||
|
||
__all__ = [ | ||
events, | ||
exceptions, | ||
nova_external_events, | ||
summary, | ||
service_features, | ||
service_network_checks, | ||
vm_info, | ||
] |