Skip to content

Commit

Permalink
remove redundant typecast
Browse files Browse the repository at this point in the history
  • Loading branch information
jenshnielsen committed Feb 10, 2022
1 parent 34418c5 commit ef5bb5f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions qcodes_contrib_drivers/drivers/NationalInstruments/Switch.py
@@ -1,9 +1,8 @@
import logging
from typing import Optional, Dict, List, cast
from typing import Dict, List, Optional, cast

from qcodes import Instrument, InstrumentChannel, ChannelList

from niswitch import Session, PathCapability
from niswitch import PathCapability, Session
from qcodes import ChannelList, Instrument, InstrumentChannel

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -159,5 +158,5 @@ def disconnect_from_all(self) -> None:
Disconnect this channel from all channels it is connected to.
"""
while len(self.connection_list) > 0:
ch = cast(InstrumentChannel, self.connection_list[0])
ch = self.connection_list[0]
self.disconnect_from(ch)

0 comments on commit ef5bb5f

Please sign in to comment.