Disable strict type checks for tests (#49851)

This commit is contained in:
Ruslan Sayfutdinov 2021-04-29 14:57:02 +01:00 committed by GitHub
parent 6f36fcc427
commit 02764c2f46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 25 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@ -359,6 +359,12 @@ def generate_and_validate(config: Config) -> str:
for key in STRICT_SETTINGS:
mypy_config.set(strict_section, key, "true")
# Disable strict checks for tests
tests_section = "mypy-tests.*"
mypy_config.add_section(tests_section)
for key in STRICT_SETTINGS:
mypy_config.set(tests_section, key, "false")
ignored_section = "mypy-" + ",".join(IGNORED_MODULES)
mypy_config.add_section(ignored_section)
mypy_config.set(ignored_section, "ignore_errors", "true")

View File

@ -0,0 +1 @@
"""device_automation tests."""

View File

@ -0,0 +1 @@
"""generic_thermostat tests."""

View File

@ -0,0 +1 @@
"""Tests for hive."""

View File

@ -0,0 +1 @@
"""Tests for specific devices."""

View File

@ -0,0 +1 @@
"""maxcube tests."""

1
tests/mock/__init__.py Normal file
View File

@ -0,0 +1 @@
"""Mock helpers."""