mirror of
https://github.com/OMGeeky/pytiled_parser.git
synced 2026-01-20 01:21:06 +01:00
I'm back!
This commit is contained in:
22
test/test_attr.py
Normal file
22
test/test_attr.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import attr
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True, kw_only=True)
|
||||
class Foo:
|
||||
x: int
|
||||
y: int
|
||||
|
||||
a: int = 5
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True, kw_only=True)
|
||||
class Bar(Foo):
|
||||
z: int
|
||||
|
||||
|
||||
foo = Foo(x=1, y=2)
|
||||
|
||||
bar = Bar(x=1, y=2, z=3)
|
||||
|
||||
print(foo)
|
||||
print(bar)
|
||||
Reference in New Issue
Block a user