question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Supporting `Union`

See original GitHub issue

quick thought: plenty of functions accept multiple types for a given argument using typing.Union. It would be nice if we could somehow support that. Perhaps if a Union is specified, the widget itself could be “swappable” (i.e. right click on it and you can select from the various types in the Union)

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
tlambert03commented, Aug 23, 2022

Maybe a better scenario of where Union would make sense would be Union[PointsData, SurfaceData]. Functions operating on points could equally operate on Surfaces (or the vertices thereof, respectively).

yep, agreed! That’s the bit that I think could already work fine, but napari would have to register something for that union. (I see that the combinatorics get hairy… and it’s possible magicgui could also help here… but I think it’s best to have a little input from the downstream library)

1reaction
tlambert03commented, Mar 17, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

How today's unions help working people: Giving workers the ...
The freedom of workers to join together in unions and negotiate with employers (in a ... Unions support strong families with better benefits...
Read more >
What Unions Do - AFL-CIO
Joining together in unions enables workers to negotiate for higher wages and benefits and improve conditions in the workplace. There are millions of...
Read more >
Your Right to Form a Union | National Labor Relations Board
Your employer may voluntarily recognize a union based on evidence - typically signed union-authorization cards - that a majority of employees want it...
Read more >
U.S. Approval of Labor Unions at Highest Point Since 1965
Support for labor unions was highest in the 1950s, when three in four Americans said they approved. Support only dipped below the 50%...
Read more >
Support for labor unions in the U.S. is at a 57-year high - NPR
Seventy-one percent of Americans now approve of labor unions — up from last year's 68%. Union support is also up from 64%, before...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found