Skip to content

Move per-file strict Optional checking to mypy's main config file #3698

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions mypy_self_check.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,57 @@
disallow_untyped_defs = True
disallow_subclassing_any = True
warn_no_return = True
strict_optional = True

; historical exceptions
[mypy-mypy.test.testextensions]
disallow_untyped_defs = False

; non-strict Optional modules
[mypy-mypy.build]
strict_optional = False

[mypy-mypy.checker]
strict_optional = False

[mypy-mypy.checkexpr]
strict_optional = False

[mypy-mypy.fastparse]
strict_optional = False

[mypy-mypy.fastparse2]
strict_optional = False

[mypy-mypy.main]
strict_optional = False

[mypy-mypy.myunit]
strict_optional = False

[mypy-mypy.semanal]
strict_optional = False

[mypy-mypy.server.astdiff]
strict_optional = False

[mypy-mypy.server.astmerge]
strict_optional = False

[mypy-mypy.server.aststrip]
strict_optional = False

[mypy-mypy.server.update]
strict_optional = False

[mypy-mypy.test.testinfer]
strict_optional = False

[mypy-mypy.test.testmerge]
strict_optional = False

[mypy-mypy.test.testtypes]
strict_optional = False

[mypy-mypy.waiter]
strict_optional = False
53 changes: 0 additions & 53 deletions mypy_strict_optional.ini

This file was deleted.

4 changes: 1 addition & 3 deletions runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,7 @@ def add_basic(driver: Driver) -> None:


def add_selftypecheck(driver: Driver) -> None:
driver.add_mypy_package('package mypy nonstrict optional', 'mypy', '--config-file',
'mypy_self_check.ini')
driver.add_mypy_package('package mypy', 'mypy', '--config-file', 'mypy_strict_optional.ini')
driver.add_mypy_package('package mypy', 'mypy', '--config-file', 'mypy_self_check.ini')


def find_files(base: str, prefix: str = '', suffix: str = '') -> List[str]:
Expand Down