Closed phillco closed 2 years ago
Do we want to add a
if typing.TYPE_CHECKING
per Slack?
I wasn't sure if that is helpful in our case as it'll still generate an error if undefined!
Do we want to add a if typing.TYPE_CHECKING per Slack?
Sorry, I didn't follow this part of the discussion. Is this suggesting we set mypy
?
Do we want to add a if typing.TYPE_CHECKING per Slack?
Sorry, I didn't follow this part of the discussion. Is this suggesting we set
mypy
?
This constant allows you to distinguish between evaluation for type checking and evaluation for execution. I think this isn't too useful here as the problem isn't with type checking per se, it's that talon.ui.Element isn't even defined on Windows (or Linux).
Do we want to add a if typing.TYPE_CHECKING per Slack?
Sorry, I didn't follow this part of the discussion. Is this suggesting we set
mypy
?This constant allows you to distinguish between evaluation for type checking and evaluation for execution. I think this isn't too useful here as the problem isn't with type checking per se, it's that talon.ui.Element isn't even defined on Windows (or Linux).
Yeah I think it wouldn't necessarily solve any problems, just was thinking might be good hygiene, but the docs seem to imply that it's only worth the complexity if the module is expensive to import, so maybe we should just leave it
@nriley @pokey mind stamping this one? Thanks
Pretty sure @nriley has to do it because he requested changes
Ah, interesting.
@nriley think you actually have to explicitly give this an "approved" code review, because you previously requested changes (that's what pokey is referring to) :)
OK, that works! Still learning here…
It's actually new to me too -- our GitHub Enterprise instance at work doesn't have this feature yet, so it actually causes a little bit of conflict (e.g. "I requested changes but then somebody else approved it and you merged it without addressing my concern, etc etc") :)
Per Slack discussion with aegis,
talon.ui.mac
shouldn't imported from it all, we should import use the platform independent version instead.Specifically, the mac package fails to raise
ImportError
properly: