Skip to content

Commit bdd8978

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 4f9f289 commit bdd8978

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

mypy/errorcodes.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,7 @@ def __hash__(self) -> int:
173173
"comparison-overlap", "Check that types in comparisons and 'in' expressions overlap", "General"
174174
)
175175
SAFE_DATETIME: Final = ErrorCode(
176-
"safe-datetime",
177-
"Disallow datetime where date is expected",
178-
"General",
179-
default_enabled=False,
176+
"safe-datetime", "Disallow datetime where date is expected", "General", default_enabled=False
180177
)
181178
NO_ANY_UNIMPORTED: Final = ErrorCode(
182179
"no-any-unimported", 'Reject "Any" types from unfollowed imports', "General"

mypy/subtypes.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -538,10 +538,12 @@ def visit_instance(self, left: Instance) -> bool:
538538

539539
# Check if this is the datetime/date relationship that should be blocked
540540
# when safe-datetime is enabled
541-
if (self.options
542-
and codes.SAFE_DATETIME in self.options.enabled_error_codes
543-
and lname == DATETIME_DATE_FULLNAMES[0]
544-
and rname == DATETIME_DATE_FULLNAMES[1]):
541+
if (
542+
self.options
543+
and codes.SAFE_DATETIME in self.options.enabled_error_codes
544+
and lname == DATETIME_DATE_FULLNAMES[0]
545+
and rname == DATETIME_DATE_FULLNAMES[1]
546+
):
545547
return False
546548

547549
# Always try a nominal check if possible,

0 commit comments

Comments
 (0)