From 5673b498267527d02882edcc00f474f19fb7fcc6 Mon Sep 17 00:00:00 2001 From: fredfishgames Date: Fri, 8 Dec 2017 18:26:38 +0000 Subject: [PATCH] Added self: Any linter test --- tools/custom_check.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/custom_check.py b/tools/custom_check.py index d26e664..706ceb3 100644 --- a/tools/custom_check.py +++ b/tools/custom_check.py @@ -137,6 +137,10 @@ def build_custom_checkers(by_lang): 'description': 'Missing whitespace after "#"'}, {'pattern': "assertEquals[(]", 'description': 'Use assertEqual, not assertEquals (which is deprecated).'}, + {'pattern': 'self: Any', + 'description': 'you can omit Any annotation for self', + 'good_lines': ['def foo (self):'], + 'bad_lines': ['def foo(self: Any):']}, {'pattern': "== None", 'description': 'Use `is None` to check whether something is None'}, {'pattern': "type:[(]",