NixOS / nixops

NixOps is a tool for deploying to NixOS machines in a network or cloud.
https://nixos.org/nixops
GNU Lesser General Public License v3.0
1.87k stars 364 forks source link

Plugin types: Tie a ResourceState to its corresponding ResourceDefinition #1346

Closed grahamc closed 4 years ago

grahamc commented 4 years ago

Using a protocol here makes mypy much more picky about variable definitions in the base classes (I think this is a good thing.) This helped find some hidden assumptions which are more correctly typed now.

grahamc commented 4 years ago

I'm not sure about this last commit, but I think we do need to specify it is as generic as possible.