mirror of
https://github.com/certbot/certbot.git
synced 2026-02-24 02:10:27 -05:00
* Remove unsupported pylint disable options
* star-args removed in Pylint 1.4.3
* abstract-class-little-used removed in Pylint 1.4.3
* Fixes new lint errors
* Copy dummy-variable-rgx expression to new ignored-argument-names expression to ignore unused funtion arguments
* Notable changes
* Refactor to satisfy Pylint no-else-return warning
* Fix Pylint inconsistent-return-statements warning
* Refactor to satisfy consider-iterating-dictionary
* Remove methods with only super call to satisfy useless-super-delegation
* Refactor too-many-nested-statements where possible
* Suppress type checked errors where member is dynamically added (notably derived from josepy.JSONObjectWithFields)
* Remove None default of func parameter for ExitHandler and ErrorHandler
Resolves #5973
53 lines
1.7 KiB
Python
53 lines
1.7 KiB
Python
"""Certbot compatibility test interfaces"""
|
|
import zope.interface
|
|
|
|
import certbot.interfaces
|
|
|
|
# pylint: disable=no-self-argument,no-method-argument
|
|
|
|
|
|
class IPluginProxy(zope.interface.Interface): # pylint: disable=inherit-non-class
|
|
"""Wraps a Certbot plugin"""
|
|
|
|
http_port = zope.interface.Attribute(
|
|
"The port to connect to on localhost for HTTP traffic")
|
|
|
|
https_port = zope.interface.Attribute(
|
|
"The port to connect to on localhost for HTTPS traffic")
|
|
|
|
def add_parser_arguments(cls, parser):
|
|
"""Adds command line arguments needed by the parser"""
|
|
|
|
def __init__(args): # pylint: disable=super-init-not-called
|
|
"""Initializes the plugin with the given command line args"""
|
|
|
|
def cleanup_from_tests(): # type: ignore
|
|
"""Performs any necessary cleanup from running plugin tests.
|
|
|
|
This is guaranteed to be called before the program exits.
|
|
|
|
"""
|
|
|
|
def has_more_configs(): # type: ignore
|
|
"""Returns True if there are more configs to test"""
|
|
|
|
def load_config(): # type: ignore
|
|
"""Loads the next config and returns its name"""
|
|
|
|
def get_testable_domain_names(): # type: ignore
|
|
"""Returns the domain names that can be used in testing"""
|
|
|
|
|
|
class IAuthenticatorProxy(IPluginProxy, certbot.interfaces.IAuthenticator):
|
|
"""Wraps a Certbot authenticator"""
|
|
|
|
|
|
class IInstallerProxy(IPluginProxy, certbot.interfaces.IInstaller):
|
|
"""Wraps a Certbot installer"""
|
|
|
|
def get_all_names_answer(): # type: ignore
|
|
"""Returns all names that should be found by the installer"""
|
|
|
|
|
|
class IConfiguratorProxy(IAuthenticatorProxy, IInstallerProxy):
|
|
"""Wraps a Certbot configurator"""
|