Add type hints
We should think about adding type hints to all function parameters and return values (where possible). An example where this is helpful is, e.g., register_operation
where we expect string ('all', 'not0'), but can also cope with integers.
register_operation(self, op: Instruction, kind: str | int = 'all')