Skip to content

Commit

Permalink
style: Update code to pass ruff linting
Browse files Browse the repository at this point in the history
  • Loading branch information
nfelt14 committed Sep 10, 2024
1 parent 7f93da4 commit 4c05536
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/server/tekhsi_test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,11 @@ def GetHeader(self, request, context): # noqa: ARG002
reply.headerordata.header.sourcename = request.sourcename
reply.headerordata.header.sourcewidth = 4

if isinstance(data, AnalogWaveform): # pylint: disable=undefined-variable # noqa: F821
if isinstance(data, AnalogWaveform): # noqa: F821
reply.headerordata.header.wfmtype = 3
elif isinstance(data, IQWaveform): # pylint: disable=undefined-variable # noqa: F821
elif isinstance(data, IQWaveform): # noqa: F821
reply.headerordata.header.wfmtype = 6
elif isinstance(data, DigitalWaveform): # pylint: disable=undefined-variable # noqa: F821
elif isinstance(data, DigitalWaveform): # noqa: F821
reply.headerordata.header.wfmtype = 4

reply.headerordata.header.pairtype = 1
Expand Down Expand Up @@ -398,7 +398,7 @@ def GetHeader(self, request, context): # noqa: ARG002,PLR0912,PLR0915,C901
reply.headerordata.header.noofsamples = wfm.length
reply.headerordata.header.sourcename = request.sourcename

if isinstance(data, AnalogWaveform): # pylint: disable=undefined-variable # noqa: F821
if isinstance(data, AnalogWaveform): # noqa: F821
if wfm.type == WfmDataType.Int8:
reply.headerordata.header.sourcewidth = 1
reply.headerordata.header.wfmtype = 1
Expand All @@ -411,7 +411,7 @@ def GetHeader(self, request, context): # noqa: ARG002,PLR0912,PLR0915,C901
else:
reply.headerordata.header.sourcewidth = 1
reply.headerordata.header.wfmtype = 1
elif isinstance(data, IQWaveform): # pylint: disable=undefined-variable # noqa: F821
elif isinstance(data, IQWaveform): # noqa: F821
if wfm.type == WfmDataType.Int8:
reply.headerordata.header.sourcewidth = 1
reply.headerordata.header.wfmtype = 6
Expand All @@ -421,7 +421,7 @@ def GetHeader(self, request, context): # noqa: ARG002,PLR0912,PLR0915,C901
else:
reply.headerordata.header.sourcewidth = 1
reply.headerordata.header.wfmtype = 6
elif isinstance(data, DigitalWaveform): # pylint: disable=undefined-variable # noqa: F821
elif isinstance(data, DigitalWaveform): # noqa: F821
if wfm.type == WfmDataType.Int8:
reply.headerordata.header.sourcewidth = 1
reply.headerordata.header.wfmtype = 4
Expand Down

0 comments on commit 4c05536

Please sign in to comment.