Run mypy with --strict on modules that are ready for it (#10166)

This commit is contained in:
ohemorange 2025-01-30 15:11:31 -08:00 committed by GitHub
parent d5cb89ba13
commit 0dedef801a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View file

@ -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.

View file

@ -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