mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
pylint: Adapt to new Pylint 2.8
- globally ignore `consider-using-with` - fix `consider-using-max-builtin` - explicitly enable pylint on project configuration - unpin Pylint - added transformation for IntegrationTest attributes(will work unless explicitly defined) Fixes: https://pagure.io/freeipa/issue/8818 Signed-off-by: Stanislav Levin <slev@altlinux.org> Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
committed by
Florence Blanc-Renaud
parent
180af784aa
commit
bdb2696805
@@ -182,50 +182,6 @@ ipa_class_members = {
|
||||
'validatedns',
|
||||
'normalizedns',
|
||||
],
|
||||
'ipatests.test_integration.base.IntegrationTest': [
|
||||
{'domain': [
|
||||
{'name': dir(str)},
|
||||
]},
|
||||
{'master': [
|
||||
{'config': [
|
||||
{'dirman_dn': dir(str)},
|
||||
{'dirman_password': dir(str)},
|
||||
{'admin_password': dir(str)},
|
||||
{'admin_name': dir(str)},
|
||||
{'dns_forwarder': dir(str)},
|
||||
{'test_dir': dir(str)},
|
||||
{'ad_admin_name': dir(str)},
|
||||
{'ad_admin_password': dir(str)},
|
||||
{'domain_level': dir(str)},
|
||||
{'fips_mode': dir(bool)},
|
||||
]},
|
||||
{'domain': [
|
||||
{'basedn': dir(str)},
|
||||
{'realm': dir(str)},
|
||||
{'name': dir(str)},
|
||||
]},
|
||||
{'external_hostname': dir(str)},
|
||||
{'hostname': dir(str)},
|
||||
'ip',
|
||||
'collect_log',
|
||||
{'run_command': [
|
||||
{'stdout_text': dir(str)},
|
||||
{'stderr_text': dir(str)},
|
||||
'returncode',
|
||||
]},
|
||||
{'transport': ['put_file', 'file_exists']},
|
||||
'put_file_contents',
|
||||
'get_file_contents',
|
||||
'ldap_connect',
|
||||
{'spawn_expect': ['__enter__', '__exit__']},
|
||||
]},
|
||||
'replicas',
|
||||
'clients',
|
||||
'ad_domains',
|
||||
{'ads': dir(list)},
|
||||
{'ad_subdomains': dir(list)},
|
||||
{'ad_treedomains': dir(list)},
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -576,3 +532,41 @@ AstroidBuilder(MANAGER).string_build(textwrap.dedent(
|
||||
dns.rdatatype.URI = 0
|
||||
"""
|
||||
))
|
||||
|
||||
AstroidBuilder(MANAGER).string_build(
|
||||
textwrap.dedent(
|
||||
"""\
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_ipa.integration.host import Host, WinHost
|
||||
from ipatests.pytest_ipa.integration.config import Config, Domain
|
||||
|
||||
|
||||
class PylintIPAHosts:
|
||||
def __getitem__(self, key):
|
||||
return Host()
|
||||
|
||||
|
||||
class PylintWinHosts:
|
||||
def __getitem__(self, key):
|
||||
return WinHost()
|
||||
|
||||
|
||||
class PylintADDomains:
|
||||
def __getitem__(self, key):
|
||||
return Domain()
|
||||
|
||||
|
||||
Host.config = Config()
|
||||
Host.domain = Domain()
|
||||
|
||||
IntegrationTest.domain = Domain()
|
||||
IntegrationTest.master = Host()
|
||||
IntegrationTest.replicas = PylintIPAHosts()
|
||||
IntegrationTest.clients = PylintIPAHosts()
|
||||
IntegrationTest.ads = PylintWinHosts()
|
||||
IntegrationTest.ad_treedomains = PylintWinHosts()
|
||||
IntegrationTest.ad_subdomains = PylintWinHosts()
|
||||
IntegrationTest.ad_domains = PylintADDomains()
|
||||
"""
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user