Skip to content

fix: Widen {v,h}space to int | str#1069

Open
dangotbanned wants to merge 10 commits into
uwdata:vgplot-python-api-codegenfrom
dangotbanned:vgplot-python/fix-typing-2
Open

fix: Widen {v,h}space to int | str#1069
dangotbanned wants to merge 10 commits into
uwdata:vgplot-python-api-codegenfrom
dangotbanned:vgplot-python/fix-typing-2

Conversation

@dangotbanned

@dangotbanned dangotbanned commented Jul 8, 2026

Copy link
Copy Markdown

Follow-up to #1068, which fixes the last 7 diagnostics from ty on the examples:

Show diagnostics

uv run --group dev ty check ../../../docs/public/specs/python/
error[invalid-argument-type]: Argument to function `hspace` is incorrect
  --> /mosaic/docs/public/specs/python/aeromagnetic-survey.py:15:19
   |
15 |         vg.hspace("1em"),
   |                   ^^^^^ Expected `int`, found `Literal["1em"]`
   |
info: Function defined here
   --> vgplot/plot.py:189:5
    |
189 | def hspace(px: int) -> Any:
    |     ^^^^^^ ------- Parameter declared here
    |

error[invalid-argument-type]: Argument to function `vspace` is incorrect
  --> /mosaic/docs/public/specs/python/aeromagnetic-survey.py:18:15
   |
18 |     vg.vspace("1em"),
   |               ^^^^^ Expected `int`, found `Literal["1em"]`
   |
info: Function defined here
   --> vgplot/plot.py:195:5
    |
195 | def vspace(px: int) -> Any:
    |     ^^^^^^ ------- Parameter declared here
    |

error[invalid-argument-type]: Argument to function `vspace` is incorrect
  --> /mosaic/docs/public/specs/python/legends.py:31:15
   |
31 |     vg.vspace("1em"),
   |               ^^^^^ Expected `int`, found `Literal["1em"]`
   |
info: Function defined here
   --> vgplot/plot.py:195:5
    |
195 | def vspace(px: int) -> Any:
    |     ^^^^^^ ------- Parameter declared here
    |

error[invalid-argument-type]: Argument to function `vspace` is incorrect
  --> /mosaic/docs/public/specs/python/legends.py:52:15
   |
52 |     vg.vspace("1em"),
   |               ^^^^^ Expected `int`, found `Literal["1em"]`
   |
info: Function defined here
   --> vgplot/plot.py:195:5
    |
195 | def vspace(px: int) -> Any:
    |     ^^^^^^ ------- Parameter declared here
    |

error[invalid-argument-type]: Argument to function `vspace` is incorrect
  --> /mosaic/docs/public/specs/python/legends.py:73:15
   |
73 |     vg.vspace("1em"),
   |               ^^^^^ Expected `int`, found `Literal["1em"]`
   |
info: Function defined here
   --> vgplot/plot.py:195:5
    |
195 | def vspace(px: int) -> Any:
    |     ^^^^^^ ------- Parameter declared here
    |

error[invalid-argument-type]: Argument to function `vspace` is incorrect
  --> /mosaic/docs/public/specs/python/protein-design.py:25:15
   |
25 |     vg.vspace("1.5em"),
   |               ^^^^^^^ Expected `int`, found `Literal["1.5em"]`
   |
info: Function defined here
   --> vgplot/plot.py:195:5
    |
195 | def vspace(px: int) -> Any:
    |     ^^^^^^ ------- Parameter declared here
    |

error[invalid-argument-type]: Argument to function `vspace` is incorrect
   --> /mosaic/docs/public/specs/python/protein-design.py:118:15
    |
118 |     vg.vspace("1em"),
    |               ^^^^^ Expected `int`, found `Literal["1em"]`
    |
info: Function defined here
   --> vgplot/plot.py:195:5
    |
195 | def vspace(px: int) -> Any:
    |     ^^^^^^ ------- Parameter declared here
    |

Found 7 diagnostics

@dangotbanned dangotbanned marked this pull request as ready for review July 8, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant