danielhrisca / asammdf

Fast Python reader and editor for ASAM MDF / MF4 (Measurement Data Format) files
GNU Lesser General Public License v3.0
655 stars 226 forks source link

Activate Pylint Rules #976

Closed zariiii9003 closed 10 months ago

zariiii9003 commented 10 months ago

Can you check these?

  style: commands[1]> ruff check ./src
  src/asammdf/gui/widgets/plot.py:136:8: PLR0124 Name compared with itself, consider replacing `b != b`
  src/asammdf/gui/widgets/plot.py:144:8: PLR0124 Name compared with itself, consider replacing `b != b`
  src/asammdf/gui/widgets/plot.py:4460:28: PLR0124 Name compared with itself, consider replacing `min_ != min_`
  src/asammdf/gui/widgets/plot.py:4462:28: PLR0124 Name compared with itself, consider replacing `max_ != max_`
  src/asammdf/gui/widgets/plot.py:4503:28: PLR0124 Name compared with itself, consider replacing `min_ != min_`
  src/asammdf/gui/widgets/plot.py:4505:28: PLR0124 Name compared with itself, consider replacing `max_ != max_`
  src/asammdf/gui/widgets/tabular_base.py:1382:16: PLR0124 Name compared with itself, consider replacing `target != target`
  Found 7 errors.

https://github.com/danielhrisca/asammdf/blob/43852ffec3707e835a5bf401851e65561620c944/src/asammdf/gui/widgets/plot.py#L136 https://github.com/danielhrisca/asammdf/blob/43852ffec3707e835a5bf401851e65561620c944/src/asammdf/gui/widgets/plot.py#L144 https://github.com/danielhrisca/asammdf/blob/43852ffec3707e835a5bf401851e65561620c944/src/asammdf/gui/widgets/plot.py#L4460 https://github.com/danielhrisca/asammdf/blob/43852ffec3707e835a5bf401851e65561620c944/src/asammdf/gui/widgets/plot.py#L4462 https://github.com/danielhrisca/asammdf/blob/43852ffec3707e835a5bf401851e65561620c944/src/asammdf/gui/widgets/plot.py#L4503 https://github.com/danielhrisca/asammdf/blob/43852ffec3707e835a5bf401851e65561620c944/src/asammdf/gui/widgets/plot.py#L4505 https://github.com/danielhrisca/asammdf/blob/43852ffec3707e835a5bf401851e65561620c944/src/asammdf/gui/widgets/tabular_base.py#L1382

danielhrisca commented 10 months ago

Those comparison are to check is the value is not a number NaN

zariiii9003 commented 10 months ago

Those comparison are to check is the value is not a number NaN

Ah, i didn't know that. Would you mind if i replace it with np.isnan for readability?

danielhrisca commented 10 months ago

My concern is the execution speed in this case

image

danielhrisca commented 10 months ago

thank you!