Skip to content

Commit 1aac0c7

Browse files
fixing type hints
1 parent f76efdc commit 1aac0c7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

day4/passport.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def has_valid_fields(passport: dict) -> bool:
3232

3333

3434
class Validator:
35-
def is_valid(self, field: dict) -> bool:
35+
def is_valid(self, field: str) -> bool:
3636
return True
3737

3838

@@ -42,7 +42,7 @@ def is_valid(self, birth_year: str) -> bool:
4242

4343

4444
class HeightValidator(Validator):
45-
def is_valid(self, height: dict) -> bool:
45+
def is_valid(self, height: str) -> bool:
4646
if height.endswith('in'):
4747
return 59 <= int(height[:-2]) <= 76
4848
elif height.endswith('cm'):
@@ -64,7 +64,7 @@ def is_valid(self, eye_color: dict) -> bool:
6464

6565

6666
class PidValidator(Validator):
67-
def is_valid(self, pid: dict) -> bool:
67+
def is_valid(self, pid: str) -> bool:
6868
return re.match("[0-9]{9}$", pid)
6969

7070

0 commit comments

Comments
 (0)