Open PyMarc2 opened 2 years ago
That's because they're generated at runtime:
I suspect it'd be a simple exercise to rewrite this so that it generates source code that can then be read by an IDE? I'd be open to looking at a PR...
I've looked everywhere and tried many things. It's impossible not to declare the variable name before runtime.
I would just add empty containers type<n>=None
and make_type<n>=None
.
It seems to work locally because after all the containers are overridden in the global namespace by the set_global
from the create_vector_types
function call.
Would that be an okay fix?
It's impossible not to declare the variable name before runtime.
I agree. That's why I proposed that we generate the source at install time.
The
type<n>
cannot be hinted properly in IDEs.e.g
The
make_float4
function andfloat4
types are not recognized. They are executed, but I think since they are not explicitly declared incltypes.py
, the ides have a hard time understanding