Skip to content

Commit

Permalink
Add missing type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
terrorfisch committed Jul 19, 2018
1 parent e6d6632 commit d68ce6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions qctoolkit/_program/transformation.py
@@ -1,4 +1,4 @@
from typing import Mapping, Set
from typing import Mapping, Set, Dict
from abc import abstractmethod

import numpy as np
Expand Down Expand Up @@ -44,12 +44,12 @@ def __call__(self, time: np.ndarray, data: pd.DataFrame) -> Mapping[ChannelID, n

return self._matrix @ data_in

def get_output_channels(self, input_channels: Set[ChannelID]):
def get_output_channels(self, input_channels: Set[ChannelID]) -> Set[ChannelID]:
if input_channels != set(self._matrix.columns):
raise KeyError('Invalid input channels', input_channels, set(self._matrix.columns))

return set(self._matrix.index)

@property
def compare_key(self):
def compare_key(self) -> Dict[ChannelID, Dict[ChannelID, float]]:
return self._matrix.to_dict()

0 comments on commit d68ce6c

Please sign in to comment.