You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the object_name_linter already does, class suffixes for S3 generics shouldn't be part of the linted symbol.
That is, object_length_linter(30) (the default) shouldn't lint this example:
I think the new behavior is a happier default -- often it's out of your control if you're defining a method for someone else's class.
WDYT about a third option -- enforce the length on two parts (class name and generic name)? not sure it's worth the implementation & maintenance effort but it does make some sense
Activity
stufield commentedon Oct 9, 2021
Yes! I've been bitten by this many times and have
# nolintscattered throughout my generics definition files.Looking forward to this.
AshesITR commentedon Oct 9, 2021
For now, I've even disabled the linter alltogether in the
.lintrconfig because it didn't have any true positives in my project.Refactor `object_length_linter` to properly handle generics
MichaelChirico commentedon Oct 9, 2021
Should this be an option?
AshesITR commentedon Oct 9, 2021
I'd be happy to make it optional. What should the default be? The old behaviour?
MichaelChirico commentedon Oct 9, 2021
I think the new behavior is a happier default -- often it's out of your control if you're defining a method for someone else's class.
WDYT about a third option -- enforce the length on two parts (class name and generic name)? not sure it's worth the implementation & maintenance effort but it does make some sense
AshesITR commentedon Oct 9, 2021
We could combine both by specifying two maximum lengths?
Refactor `object_length_linter` to properly handle generics
Refactor object_length_linter (#873)