pvlib-python icon indicating copy to clipboard operation
pvlib-python copied to clipboard

LGTM has 6 errors

Open mikofski opened this issue 4 years ago • 3 comments

Describe the bug LGTM shows 6 errors, at least one seems easy to fix there is a self alignment that seems redundant

To Reproduce https://lgtm.com/projects/g/pvlib/pvlib-python/alerts/?mode=list&severity=error

Expected behavior No errors?

Screenshots https://lgtm.com/projects/g/pvlib/pvlib-python/alerts/?mode=list&severity=error

Versions:

  • pvlib.__version__: 0.9ish
  • pandas.__version__: ?
  • python: 3

Additional context https://lgtm.com/projects/g/pvlib/pvlib-python/alerts/?mode=list&severity=error

mikofski avatar Aug 09 '21 15:08 mikofski

Certainly should fix that self assignment. Maybe silence the others?

wholmgren avatar Aug 09 '21 15:08 wholmgren

I found a Python "LGTM alert suppression" example here: https://lgtm.com/help/lgtm/alert-suppression#python

Altho I think we should try to learn a bit about why LGTM raises these alerts before deciding to silence them. Could be something useful?

mikofski avatar Aug 09 '21 16:08 mikofski

I've clicked the Hide button on a handful of similar alerts in the past. I didn't know about the comment option until now.

Screen Shot 2021-08-09 at 9 27 53 AM

I tried looking into it a few years ago and didn't figure it out. Maybe someone smarter than me can figure it out.

wholmgren avatar Aug 09 '21 16:08 wholmgren

I've clicked the Hide button on a handful of similar alerts in the past. I didn't know about the comment option until now.

Screen Shot 2021-08-09 at 9 27 53 AM

I tried looking into it a few years ago and didn't figure it out. Maybe someone smarter than me can figure it out.

This is a bug in LGTM. It raises this error because of the user function test in test_modelchain.py: image

Where constant_aoi_loss is a Python partial function which is the known bug in LGTM. So this error can be ignored. I am going to take a look at the others as well.

chrisorner avatar Sep 27 '22 10:09 chrisorner

I am pretty sure that the alerts under non-callable can be ignored as well: image

I described the issue here because I think it's also a bug in LGTM.

chrisorner avatar Sep 27 '22 11:09 chrisorner