flake8-functions-names icon indicating copy to clipboard operation
flake8-functions-names copied to clipboard

profile is not only a verb

Open lukasbindreiter opened this issue 2 years ago • 2 comments

class User:
    @property
    def profile_picture(self):
        return "img.jpg"

Right now the above gives the error: FNE002 The method has a @property decorator, but has a verb in it's name (profile) [flake8-functions-names] - which I think is not really warranted in this case.

I mean it is easy enough to disable for specific cases, but would it make sense to remove such words that can act as both nouns and verbs from the list? Or was it a deliberate decision anyways to include such examples as well?

lukasbindreiter avatar Nov 24 '22 09:11 lukasbindreiter

Hey. The problem exists: there are many words that can be verbs and not verbs in different situations. I think the solution is to add extra_verbs_list and extra_not_verbs_list as arguments and tune them for a concrete project.

Melevir avatar Nov 26 '22 04:11 Melevir

Oh yeah you're right, something like that would probably be a good solution then 👍

lukasbindreiter avatar Nov 28 '22 12:11 lukasbindreiter