diff --git a/mypy.ini b/mypy.ini index 2c9ba5187..4314e4db8 100644 --- a/mypy.ini +++ b/mypy.ini @@ -3,6 +3,7 @@ ignore_missing_imports = True warn_unused_ignores = True show_error_codes = True disallow_untyped_defs = True +strict_equality = True # Using stricter settings here is being tracked by # https://github.com/certbot/certbot/issues/9647. diff --git a/tox.ini b/tox.ini index 0ed68166d..82a07f0d6 100644 --- a/tox.ini +++ b/tox.ini @@ -8,7 +8,9 @@ pytest = python -m pytest {posargs} # Paths are listed on one line because tox seems to have inconsistent # behavior with substitutions that contain line continuations, see # https://github.com/tox-dev/tox/issues/2069 for more info. -source_paths = acme/acme certbot/certbot certbot-apache/certbot_apache certbot-ci/certbot_integration_tests certbot-ci/snap_integration_tests certbot-compatibility-test/certbot_compatibility_test certbot-dns-cloudflare/certbot_dns_cloudflare certbot-dns-digitalocean/certbot_dns_digitalocean certbot-dns-dnsimple/certbot_dns_dnsimple certbot-dns-dnsmadeeasy/certbot_dns_dnsmadeeasy certbot-dns-gehirn/certbot_dns_gehirn certbot-dns-google/certbot_dns_google certbot-dns-linode/certbot_dns_linode certbot-dns-luadns/certbot_dns_luadns certbot-dns-nsone/certbot_dns_nsone certbot-dns-ovh/certbot_dns_ovh certbot-dns-rfc2136/certbot_dns_rfc2136 certbot-dns-route53/certbot_dns_route53 certbot-dns-sakuracloud/certbot_dns_sakuracloud certbot-nginx/certbot_nginx +mypy_strict_source_paths = certbot-ci/snap_integration_tests certbot-dns-cloudflare/certbot_dns_cloudflare certbot-dns-digitalocean/certbot_dns_digitalocean certbot-dns-dnsimple/certbot_dns_dnsimple certbot-dns-dnsmadeeasy/certbot_dns_dnsmadeeasy certbot-dns-gehirn/certbot_dns_gehirn certbot-dns-google/certbot_dns_google certbot-dns-linode/certbot_dns_linode certbot-dns-luadns/certbot_dns_luadns certbot-dns-nsone/certbot_dns_nsone certbot-dns-ovh/certbot_dns_ovh certbot-dns-rfc2136/certbot_dns_rfc2136 certbot-dns-route53/certbot_dns_route53 certbot-dns-sakuracloud/certbot_dns_sakuracloud +mypy_no_strict_source_paths = acme/acme certbot/certbot certbot-apache/certbot_apache certbot-ci/certbot_integration_tests certbot-compatibility-test/certbot_compatibility_test certbot-nginx/certbot_nginx +source_paths = {[base]mypy_strict_source_paths} {[base]mypy_no_strict_source_paths} [testenv] platform = @@ -102,7 +104,9 @@ commands = python -m pylint --reports=n --rcfile=.pylintrc {[base]source_paths} deps = {[testenv]deps} -e certbot-ci -commands = mypy {[base]source_paths} --strict-equality +commands = + mypy {[base]mypy_no_strict_source_paths} + mypy {[base]mypy_strict_source_paths} --strict [testenv:isolated-acme] description = Tests acme without any Certbot components installed