663if isinstance(ps6000, CannotFindPicoSDKError):
664
665 @public
666 class PS6000Scope(PicoScopeSdk): # noqa, pragma: no cover, skipcq667 """PicoScope 6000 series oscilloscope is not available (Install `libps6000`)."""
668
669 def __init__(self, variant: Optional[str] = None):
612if isinstance(ps5000, CannotFindPicoSDKError):
613
614 @public
615 class PS5000Scope(PicoScopeSdk): # noqa, pragma: no cover, skipcq616 """PicoScope 5000 series oscilloscope is not available (Install `libps5000`)."""
617
618 def __init__(self, variant: Optional[str] = None):
548if isinstance(ps4000, CannotFindPicoSDKError):
549
550 @public
551 class PS4000Scope(PicoScopeSdk): # noqa, pragma: no cover, skipcq552 """PicoScope 4000 series oscilloscope is not available (Install `libps4000`)."""
553
554 def __init__(self, variant: Optional[str] = None):
434if isinstance(ps3000a, CannotFindPicoSDKError):
435
436 @public
437 class PS3000aScope(PicoScopeSdk): # noqa, pragma: no cover, skipcq438 """PicoScope 3000 series (A API) oscilloscope is not available (Install `libps3000a`)."""
439
440 def __init__(self, variant: Optional[str] = None):
358if isinstance(ps3000, CannotFindPicoSDKError):
359
360 @public
361 class PS3000Scope(PicoScopeSdk): # noqa, pragma: no cover, skipcq362 """PicoScope 3000 series oscilloscope is not available (Install `libps3000`)."""
363
364 def __init__(self, variant: Optional[str] = None):
A method marked with @abstractmethod
is not defined in the concrete class. This can result in unintended behavior.
It is recommended to implement all abstract methods in the derived classes.
from abc import ABC, abstractmethod
class Vehicle(ABC):
@abstractmethod
def start():
pass
class Car(Vehicle):
# No overridden `start` method here. Can cause unintended behavior
def stop():
self.speed = 0
from abc import ABC, abstractmethod
class Vehicle(ABC):
@abstractmethod
def start():
pass
class Car(Vehicle):
def start():
self.speed = 3
def stop():
self.speed = 0