Skip to content

Commit fe855e7

Browse files
hauntsaninjahugovk
authored andcommitted
Use --no-implicit-optional for type checking (psf#3220)
This makes type checking PEP 484 compliant (as of 2018). mypy will change its defaults soon. See: python/mypy#9091 python/mypy#13401
1 parent 29c3787 commit fe855e7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

mypy.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ warn_no_return=True
2222
warn_redundant_casts=True
2323
warn_unused_ignores=True
2424
disallow_any_generics=True
25+
no_implicit_optional=True
2526

2627
# Unreachable blocks have been an issue when compiling mypyc, let's try
2728
# to avoid 'em in the first place.

src/blib2to3/pgen2/parse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def add_token(self, tok_type: int, tok_val: Text, raw: bool = False) -> None:
114114
args.insert(0, ilabel)
115115
func(*args)
116116

117-
def determine_route(self, value: Text = None, force: bool = False) -> Optional[int]:
117+
def determine_route(self, value: Optional[Text] = None, force: bool = False) -> Optional[int]:
118118
alive_ilabels = self.ilabels
119119
if len(alive_ilabels) == 0:
120120
*_, most_successful_ilabel = self._dead_ilabels

0 commit comments

Comments
 (0)