This repository has been archived by the owner on Jan 25, 2024. It is now read-only.
Typing issues with Board.backend #409
Labels
typing
A incorrect or loose type that needs correcting.
I think the issue is partially due to
backend
being of typeType[Backend]
rather thanBackend
. If the below code is used MyPy is happy but it will almost certainly run time error when we don't provide the necessary values to the subtype's constructor.Converting
Backend.board
from a@property
to a@classmethod
is the only thing, other than thecast
, that I can think of but that would require large changes to the codebase andBackend.board()
doesn't feel particularly nice, though a rename could fix that.Do you think it's worth changing, or should we just leave as the
cast
?Originally posted by @sedders123 in #406
The text was updated successfully, but these errors were encountered: