InputPlugin subclass' __init__ default parameters ignored #174
Replies: 2 comments 1 reply
-
I think that code added support for Can you share the code you're writing? That way it's easier to comment on the behavior or on potential bugs. If you're trying to assign a default value to an optional parameter you could make the default be None and then inside the constructor check. E.g (assuming the parameter is an
Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
I don't think the BlockFi plugin has tests unfortunately. However you could probably test this by printing |
Beta Was this translation helpful? Give feedback.
-
Can someone explain the reasoning for the code below? (found here)
It looks like it was introduced @ commit 66e194c with commit message:
and was apparently something to do with support for
src/dali/plugin/input/csv/blockfi.py
.It is catching an Optional input parameters to the manual csv importer I'm working on (or any InputPlugin for that matter), and making the Parameter
None
. It appears setting them toNone
will result in ignoring the default values assigned it in the__init__
function of the manual csv importer'sInputPlugin.__init__
(or any other subclass of InputPlugin). Not sure if this is intentionally or was otherwise unknown. Regardless it interferes with what I'm trying to do so I want to modify the logic without breaking whatever its original purpose was.Can someone point me to what exactly in the
src/dali/plugin/input/csv/blockfi.py
used this logic to run successfully?Beta Was this translation helpful? Give feedback.
All reactions