From 6b709f4423d132742207b5cf01a64f0707a77927 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Tue, 31 May 2022 19:34:32 +0200 Subject: Added pylint config, code improvements suggested by pylint --- lab_control/oscilloscope.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'lab_control/oscilloscope.py') diff --git a/lab_control/oscilloscope.py b/lab_control/oscilloscope.py index 9f2d02c..e4b5a89 100644 --- a/lab_control/oscilloscope.py +++ b/lab_control/oscilloscope.py @@ -1,17 +1,21 @@ +""" Interface definition for oscilloscope devices. """ + class Oscilloscope: + """ + This interface specifies the common API for all + supported oscilloscope devices. + """ def __init__(self): - raise Exception("This class should not be instantiated directly, please extend it instead") + pass def measureAmplitude(self, channel: int) -> float: - pass + """ Return amplitude measurement on specific channel. """ def measurePeakToPeak(self, channel: int) -> float: - pass + """ Return peak-to-peak measurement on specific channel. """ def measureRMS(self, channel: int) -> float: - pass + """ Return RMS measurement on specific channel. """ def measureFrequency(self, channel: int) -> float: - pass - - + """ Return frequency measurement on specific channel. """ -- cgit v1.2.3