Closed jrobinAV closed 1 year ago
I am assuming you're referring to this method in the file src/taipy/core/data/data_node.py. Can you explain the changes that are needed and assign this issue to me @jrobinAV
If you remove the # type: ignore
, mypy will complain that:
Incompatible return value type (got "Type[NotImplementedError]", expected "str")
The purpose of this issue is to safely remove the # type: ignore
and still follow mypy style guideline.
Alright I'll get started @trgiangdo . Please assign this issue to me @jrobinAV
If you remove the
# type: ignore
, mypy will complain that:Incompatible return value type (got "Type[NotImplementedError]", expected "str")
The purpose of this issue is to safely remove the
# type: ignore
and still follow mypy style guideline.
What command is leading to this error log? @trgiangdo
You can try to remove the # type: ignore
and run this command on the terminal:
mypy --ignore-missing-imports --implicit-optional .
Thanks!
i got this error 2 times , but not the one that you mentioned
error: No overload variant of "asdict" matches argument type "_BaseModel" [call-overload]
@trgiangdo
The full error message that you are looking for:
src/taipy/core/data/data_node.py:314: error: Incompatible return value type (got "Type[NotImplementedError]", expected "str") [return-value]
If it's not showing up, maybe we are missing something.
Yeah that one isn't there @trgiangdo
@trgiangdo ?
Can you show me:
src/taipy/core/data/data_node.py
file at line 311-314Sure, what command should i use for python @trgiangdo ? The mypy version is giving the same result as before Here is the ss of the code you asked for
Can you try to remove the # type: ignore
from line 314?
Then the error I mentioned should show up.
Both these solution seem to resolve this error @trgiangdo
@trgiangdo
Sorry for the late response, I was away for the weekend.
About your fix, it's contradictory with the purpose of the storage_type() method. It should always return the NotImplemented exception to avoid the user from using the _DataNode class directly, or a child class without the storage type would raise an error.
Please find another work-around
This seems to work as well @trgiangdo
Hacktoberfest will be ending tomorrow so it will be really helpful if we could close this issue before then @trgiangdo . Please review this solution
Hey, i think there has been some mistake because this repository is shown as not participating in hacktoberfest 2023. Please look into it. @trgiangdo @jrobinAV @FlorianJacta
Please confirm @trgiangdo
@ashutuptiwari The warning should go away now. Can you try again?
Yes it did @FlorianJacta . Thanks a bunch!
I guess this issue can be closed?
We will review it and close done issue on every sprint. The merged PR should be sufficient for the hacktoberfest, no?
Oh yes it is. I was just curious.
Hi guys, I was wondering if i would recieve some sticker packs or some swag @FabienLelaquais @jrobinAV @FlorianJacta @marisogo
Hi @ashutuptiwari, can you shoot me an email at: marine.gosselin@taipy.com? So we can organize sending you the swag :)
The storageType method must return a str and not an Optional[str]. This is incompatible with the current implementation of the
_class_map
method