Skip to content
Snippets Groups Projects
Commit 808bd896 authored by Ian Stapleton Cordasco's avatar Ian Stapleton Cordasco Committed by GitHub
Browse files

Merge pull request #42 from Carreau/init-subclass-is-classmethod

Correct N804/N805 for __init_subclass__
parents 06cd421a dfad62ca
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -154,7 +154,7 @@ class NamingChecker(object):
continue
 
node.function_type = 'method'
if node.name == '__new__':
if node.name in ('__new__', '__init_subclass__'):
node.function_type = 'classmethod'
 
if node.name in late_decoration:
Loading
Loading
Loading
Loading
@@ -11,3 +11,6 @@ class Foo(object):
@calling()
def test(self, ads):
pass
def __init_subclass(self, ads):
pass
Loading
Loading
@@ -14,3 +14,8 @@ class Foo(object):
@classmethod
def __prepare__(cls):
pass
#: Okay
class Foo(object):
def __init_subclass__(cls):
pass
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment