Unfortunately, pyflakes (which we use via flake8), reports stuff like:
F821 undefined name 'VertexId'
F821 undefined name 'output'
...
Solution in this PR
There may be (or come, e.g. PEP 593) ways to mark our type annotations to prevent pyflakes from seeing our strings as forward declarations, but these will likely make the spelling more complex.
A very simple solution (both in implementation and use) is to also allow default values to specify the shader type info. This information is as easy to obtain as the annotations. In usage, it is as simple as changing the above code to (replacing : with =):
Closes #40
The problem
We use annotations to specify shader type information using tuples, e.g.:
Unfortunately, pyflakes (which we use via flake8), reports stuff like:
Solution in this PR
There may be (or come, e.g. PEP 593) ways to mark our type annotations to prevent pyflakes from seeing our strings as forward declarations, but these will likely make the spelling more complex.
A very simple solution (both in implementation and use) is to also allow default values to specify the shader type info. This information is as easy to obtain as the annotations. In usage, it is as simple as changing the above code to (replacing
:
with=
):