-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
cleanup 🧹Refactorings and other tasks that improve the codeRefactorings and other tasks that improve the codegood first issueGood for newcomersGood for newcomers
Milestone
Description
Is your feature request related to a problem?
The way warnings are raised is not consistent throughout the codebase.
Some things I noticed:
_elastic_net_regression.pyuses bothfrom warnings import warn(in combination with calls towarn(...)) andimport warnings(in combination withwarnings.warn(...)).- Sometimes,
UserWarningis explicitely passed ascategorykeyword argument, sometimes it is left out (asUserWarningis the default value). - The warnings raised in the
Transformerclasses lack the trailing period. - The warnings raised in the
Transformerclass generally talk aboutcolumnseven when there could be just one column that is mentioned. Sayingcolumn(s)might be more accurate in those cases.
Point 3 is actually somewhat important because it would make writing regexes easier if the warnings all had the same format.
Point 4 is probably the least important, might even decide to keep it as is, as the messages are probably easier to read this way.
To quickly find the warnings raised with warnings.warn:
grep -E -r -n 'warnings.warn' srcTo quickly find those raised with warn:
grep -E -r -n 'from warnings import warn' srcDesired solution
Use the same style everywhere.
Ideally, find a way to have the linter enforce a consistent style.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
cleanup 🧹Refactorings and other tasks that improve the codeRefactorings and other tasks that improve the codegood first issueGood for newcomersGood for newcomers
Type
Projects
Status
Backlog