{"action":"created","issue":{"url":"https://api.github.com/repos/OCA/maintainer-quality-tools/issues/164","labels_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/issues/164/labels{/name}","comments_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/issues/164/comments","events_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/issues/164/events","html_url":"https://github.com/OCA/maintainer-quality-tools/issues/164","id":57302089,"number":164,"title":"new 1.6 pep8 release makes some branches red","user":{"login":"lepistone","id":1314778,"avatar_url":"https://avatars.githubusercontent.com/u/1314778?v=3","gravatar_id":"","url":"https://api.github.com/users/lepistone","html_url":"https://github.com/lepistone","followers_url":"https://api.github.com/users/lepistone/followers","following_url":"https://api.github.com/users/lepistone/following{/other_user}","gists_url":"https://api.github.com/users/lepistone/gists{/gist_id}","starred_url":"https://api.github.com/users/lepistone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lepistone/subscriptions","organizations_url":"https://api.github.com/users/lepistone/orgs","repos_url":"https://api.github.com/users/lepistone/repos","events_url":"https://api.github.com/users/lepistone/events{/privacy}","received_events_url":"https://api.github.com/users/lepistone/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-11T11:04:49Z","updated_at":"2015-02-27T11:36:15Z","closed_at":null,"body":"pep8 adds some new checks by default: https://github.com/jcrocholl/pep8/blob/master/CHANGES.txt#L25\r\n\r\nThe first I found was E402 (imports must be at top of file) and it seemed reasonable and easy to fix in OCA/sale-workflow#108, but there may be others. So we could:\r\n\r\n1 fix any other individual issue like I did for sale-workflow\r\n2 ignore the new checks that make some of our branches red\r\n3 keep an old pep8 version\r\n\r\nI suggest 1 if easy to fix and reasonable, otherwise 2. What do you think?"},"comment":{"url":"https://api.github.com/repos/OCA/maintainer-quality-tools/issues/comments/76381824","html_url":"https://github.com/OCA/maintainer-quality-tools/issues/164#issuecomment-76381824","issue_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/issues/164","id":76381824,"user":{"login":"lepistone","id":1314778,"avatar_url":"https://avatars.githubusercontent.com/u/1314778?v=3","gravatar_id":"","url":"https://api.github.com/users/lepistone","html_url":"https://github.com/lepistone","followers_url":"https://api.github.com/users/lepistone/followers","following_url":"https://api.github.com/users/lepistone/following{/other_user}","gists_url":"https://api.github.com/users/lepistone/gists{/gist_id}","starred_url":"https://api.github.com/users/lepistone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lepistone/subscriptions","organizations_url":"https://api.github.com/users/lepistone/orgs","repos_url":"https://api.github.com/users/lepistone/repos","events_url":"https://api.github.com/users/lepistone/events{/privacy}","received_events_url":"https://api.github.com/users/lepistone/received_events","type":"User","site_admin":false},"created_at":"2015-02-27T11:36:15Z","updated_at":"2015-02-27T11:36:15Z","body":"@dreispt I think the use we do of lambdas in odoo is pep8-legal, and the pep8 tool should be ok with it in the latest version. See the discussion on https://github.com/jcrocholl/pep8/issues/311.\r\n\r\nTL;DR : it is **direct assignment** which is pep8-forbidden: `f = lambda x: 2 * x`, because you can replace it with `def f(x): return 2 * x` and you get better introspection of `f`. \r\n\r\nInstead, our use which is `Field(parameter=lambda x: 2 * x)` should be recognized by the pep8 tool as legal.\r\n\r\nBut maybe it isn't... if that is the case, we can of course disable the check.\r\n\r\nAnyway I agree with you @dreispt that one way or the other we can keep our lambdas in field definitions."}}