You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please provide more information to help us understand the issue:
Are you reporting a bug, or opening a feature request?
Bug report, I think? Although the usage here is sufficiently sophisticated that it might qualify as a feature.
Please insert below the code you are checking with mypy,
or a mock-up repro if the source is private. We would appreciate
if you try to simplify your case to a minimal repro.
In trying to work around this issue with datetime.date, I was trying to make a protocol that was date-"ish" and precluded passing a date. But it seemed that anywhere I wanted to accept or return a date-ish object I ran into this problem:
Incompatible types in assignment (expression has type "Concrete", variable has type "Abstract")
Following member(s) of "Concrete" have conflicts:
Expected:
def method(self, argument: Abstract) -> None
Got:
def method(self, argument: Concrete) -> None
What is the behavior/output you expect?
I would expect this to pass typechecking.
What are the versions of mypy and Python you are using?
0.761, 3.6.8
Do you see the same issue after installing mypy from Git master?
Haven't tried.
What are the mypy flags you are using? (For example --strict-optional)
@ilevkivskyi I can't figure out how to formulate the issue that I still have, which is that I can't figure out how to make something that duck-types to a date but not a datetime; there is some level of self-referentiality where this technique breaks down, but I can't figure out exactly where without slogging through the whole date representation.
Please provide more information to help us understand the issue:
Bug report, I think? Although the usage here is sufficiently sophisticated that it might qualify as a feature.
or a mock-up repro if the source is private. We would appreciate
if you try to simplify your case to a minimal repro.
In trying to work around this issue with datetime.date, I was trying to make a protocol that was date-"ish" and precluded passing a date. But it seemed that anywhere I wanted to accept or return a date-ish object I ran into this problem:
I would expect this to pass typechecking.
0.761, 3.6.8
Haven't tried.
the full traceback below.
No tracebacks here.
The text was updated successfully, but these errors were encountered: