{"action":"created","issue":{"url":"https://api.github.com/repos/GreenSteam/pep257/issues/68","labels_url":"https://api.github.com/repos/GreenSteam/pep257/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/GreenSteam/pep257/issues/68/comments","events_url":"https://api.github.com/repos/GreenSteam/pep257/issues/68/events","html_url":"https://github.com/GreenSteam/pep257/issues/68","id":31388622,"number":68,"title":"D401 implementation is very naive","user":{"login":"adiroiban","id":204609,"avatar_url":"https://avatars.githubusercontent.com/u/204609?v=3","gravatar_id":"","url":"https://api.github.com/users/adiroiban","html_url":"https://github.com/adiroiban","followers_url":"https://api.github.com/users/adiroiban/followers","following_url":"https://api.github.com/users/adiroiban/following{/other_user}","gists_url":"https://api.github.com/users/adiroiban/gists{/gist_id}","starred_url":"https://api.github.com/users/adiroiban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adiroiban/subscriptions","organizations_url":"https://api.github.com/users/adiroiban/orgs","repos_url":"https://api.github.com/users/adiroiban/repos","events_url":"https://api.github.com/users/adiroiban/events{/privacy}","received_events_url":"https://api.github.com/users/adiroiban/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2014-04-12T18:36:45Z","updated_at":"2015-10-27T15:44:39Z","closed_at":null,"body":"I have the following docstring.\r\n\r\n```\r\n    @property\r\n    def file_path(self):\r\n        '''Alias for consistency with the rest of pocketlint.'''\r\n```\r\n\r\nThe error is \r\n\r\n```\r\n     142: D401: First line should be imperative: 'Alia', not 'Alias'\r\n```\r\n\r\nWhile the intent is noble, I think that the current implementation is not helpful.\r\n\r\nIs there anyone using this check in production code?\r\n\r\nIf a check could not be done, I prefer to not try to automate it as it is not fun to maintain a list of ignored values..\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/GreenSteam/pep257/issues/comments/151545816","html_url":"https://github.com/GreenSteam/pep257/issues/68#issuecomment-151545816","issue_url":"https://api.github.com/repos/GreenSteam/pep257/issues/68","id":151545816,"user":{"login":"lordmauve","id":617224,"avatar_url":"https://avatars.githubusercontent.com/u/617224?v=3","gravatar_id":"","url":"https://api.github.com/users/lordmauve","html_url":"https://github.com/lordmauve","followers_url":"https://api.github.com/users/lordmauve/followers","following_url":"https://api.github.com/users/lordmauve/following{/other_user}","gists_url":"https://api.github.com/users/lordmauve/gists{/gist_id}","starred_url":"https://api.github.com/users/lordmauve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lordmauve/subscriptions","organizations_url":"https://api.github.com/users/lordmauve/orgs","repos_url":"https://api.github.com/users/lordmauve/repos","events_url":"https://api.github.com/users/lordmauve/events{/privacy}","received_events_url":"https://api.github.com/users/lordmauve/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T15:44:39Z","updated_at":"2015-10-27T15:44:39Z","body":"This could be fixed by listing imperative forms of verbs and comparing with, say, a [Porter stemmer](http://tartarus.org/martin/PorterStemmer/python.txt) (assuming English).\r\n\r\nIf the stemmed form of the word is in the stemmed list of verbs, then it's probably a verb. But if the unstemmed form is not in the unstemmed list, it's not in the imperative form.\r\n\r\nThis would have a much lower false positive rate than the current heuristic, but a somewhat larger false negative rate, depending on the size of the word list. But I'm guessing that relatively small lists of verbs would cover a high percentage of docstrings, due to the constrained nature of the language used (outside of domain-specific jargon).\r\n\r\nWe could generate a reasonably good word list by scanning docstrings of a few largish Python projects and manually removing words that are not imperative verbs."}}