Skip to content

Commit 40b2804

Browse files
Fix errors pointed out by the new linter version
As best Michael and I can tell, the builder line was introduced during refactoring, and does nothing so can be safely deleted
1 parent af61e49 commit 40b2804

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

softioc/builder.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,6 @@ def ClearRecords():
324324

325325
SetSimpleRecordNames(None, ':')
326326

327-
SetDeviceName = SetPrefix
328327
def SetDeviceName(name):
329328
SetPrefix(name)
330329

tests/test_record_values.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,15 +294,15 @@ def record_value_asserts(
294294
# This function is shared between functions that may pass in either a
295295
# native Python type, or the value returned from p4p, which must be
296296
# unwrapped
297-
if type(actual_value) == p4p.nt.enum.ntenum:
297+
if type(actual_value) is p4p.nt.enum.ntenum:
298298
actual_val_type = type(actual_value.raw["value"].get("index"))
299299
elif isinstance(actual_value, p4p.nt.scalar.ntwrappercommon):
300300
actual_val_type = type(actual_value.raw["value"])
301301
else:
302302
actual_val_type = type(actual_value)
303303

304304
try:
305-
if type(expected_value) == float and isnan(expected_value):
305+
if type(expected_value) is float and isnan(expected_value):
306306
assert isnan(actual_value) # NaN != Nan, so needs special case
307307
elif creation_func in [builder.WaveformOut, builder.WaveformIn]:
308308
assert numpy.array_equal(actual_value, expected_value)

0 commit comments

Comments
 (0)