Skip to content

Commit

Permalink
added typehint for optional return
Browse files Browse the repository at this point in the history
  • Loading branch information
Hundemeier committed Apr 9, 2021
1 parent a11ae9f commit dc8613a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sacn/sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import random
import time
from typing import Dict, List
from typing import Dict, List, Optional

from sacn.messages.data_packet import DataPacket
from sacn.sending.output import Output
Expand Down Expand Up @@ -133,7 +133,7 @@ def move_universe(self, universe_from: int, universe_to: int) -> None:
tmp_output._packet.option_StreamTerminated = False
self._outputs[universe_to] = tmp_output

def __getitem__(self, item: int) -> Output:
def __getitem__(self, item: int) -> Optional[Output]:
try:
return self._outputs[item]
except KeyError:
Expand Down

0 comments on commit dc8613a

Please sign in to comment.