-
Notifications
You must be signed in to change notification settings - Fork 90
Fix codacy warnings #680
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
Fix codacy warnings #680
Conversation
dario-coscia
left a comment
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.
I am against the use of pylint disable. We can discuss disabling some pylits if they are unnecessary, but I would avoid adding specific calls
Code Coverage SummaryResults for commit: 42e9933 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
GiovanniCanali
left a comment
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.
Hi @FilippoOlivo,
While we’re still discussing whether to disable pylint errors or not, I kindly ask you to remove the comments explaining the errors. They’re not code-related, and it’s easy to trace the issue directly from the error code itself.
| # Convolution in Fourier space | ||
| fourier = torch.fft.rfftn(x, dim=[0])[:modes] | ||
| # torch.fft.rfftn and irfftn are callable functions, but pylint | ||
| # incorrectly flags them as E1102 (not callable). |
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.
I would remove these comments — the pylint disable is sufficient both to suppress the error and to trace it back if needed.
|
|
||
| class EquivariantGraphNeuralOperator(torch.nn.Module): | ||
| # Disable pylint warnings for too few public methods (since this is a simple | ||
| # model class in a standard PyTorch style) |
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.
I would remove these comments — the pylint disable is sufficient both to suppress the error and to trace it back if needed.
|
|
||
| def __init__( | ||
| # Disable pylint warnings for too many arguments in init (since this is a | ||
| # model class with many configurable parameters) |
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.
I would remove these comments — the pylint disable is sufficient both to suppress the error and to trace it back if needed.
|
@FilippoOlivo I will close this issue. Please see #674. Can you open an issue where you explain the current Codacy situation and how we could improve it in a structured and maintainable way? Thank you for your effort! |
Description
This PR fixes codacy warnings introduced in #602
Checklist