-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Handle flake8 issues in part of the codebase. #2643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Two flake8 issues are raised here which were already in the original code:
I suggest adding a # noqa: E271 in these cases, since I imagine they simply mimic the original equations |
| # a better way to do it. | ||
| if isinstance(datetime_or_doy, pd.DatetimeIndex): | ||
| to_doy = tools._pandas_to_doy # won't be evaluated unless necessary | ||
| def to_datetimeindex(x): return x # noqa: E306 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E704 multiple statements on one line (def)
| import pandas as pd | ||
| from scipy.integrate import trapezoid | ||
|
|
||
| from warnings import warn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F401 'warnings.warn' imported but unused
| import numpy as np | ||
| import pandas as pd | ||
| from pvlib.tools import sind | ||
| from pvlib._deprecation import warn_deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F401 'warnings.warn' imported but unused
|
|
||
| # Explicit solutions where Gsh=0 | ||
| if np.any(idx_z): | ||
| V[idx_z] = a[idx_z] * np.log1p((IL[idx_z] - I[idx_z]) / I0[idx_z]) - \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F401 'warnings.warn' imported but unused
docs/sphinx/source/whatsnewfor all changes. Includes link to the GitHub Issue with:issue:`num`or this Pull Request with:pull:`num`. Includes contributor name and/or GitHub username (link with:ghuser:`user`).remote-data) and Milestone are assigned to the Pull Request and linked Issue.Note: will update the whatsnew in the 2nd PR (IDing the two of them)