Skip to content

Commit

Permalink
Added message doc for assigning-non-slot (#5991)
Browse files Browse the repository at this point in the history
Co-authored-by: Vladyslav Krylasov <vladyslav.krylasov@gmail.com>
  • Loading branch information
matusvalo and sprytnyk authored Mar 26, 2022
1 parent 96d7e89 commit 57c6ea8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doc/data/messages/a/assigning-non-slot/bad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class Student:
__slots__ = ('name',)

def __init__(self, name, surname):
self.name = name
self.surname = surname # [assigning-non-slot]
self.setup()

def setup(self):
pass
10 changes: 10 additions & 0 deletions doc/data/messages/a/assigning-non-slot/good.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class Student:
__slots__ = ('name', 'surname')

def __init__(self, name, surname):
self.name = name
self.surname = surname
self.setup()

def setup(self):
pass

0 comments on commit 57c6ea8

Please sign in to comment.