Skip to content

Commit 5575eea

Browse files
committed
Remove slots from attr classes to support Python 3.6
1 parent f3672a1 commit 5575eea

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

openapi_python_client/parser/properties/__init__.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
from .schemas import Schemas
1515

1616

17-
@attr.s(auto_attribs=True, frozen=True, slots=True)
17+
@attr.s(auto_attribs=True, frozen=True)
1818
class NoneProperty(Property):
1919
""" A property that is always None (used for empty schemas) """
2020

2121
_type_string: ClassVar[str] = "None"
2222
template: ClassVar[Optional[str]] = "none_property.pyi"
2323

2424

25-
@attr.s(auto_attribs=True, frozen=True, slots=True)
25+
@attr.s(auto_attribs=True, frozen=True)
2626
class StringProperty(Property):
2727
""" A property of type str """
2828

@@ -31,7 +31,7 @@ class StringProperty(Property):
3131
_type_string: ClassVar[str] = "str"
3232

3333

34-
@attr.s(auto_attribs=True, frozen=True, slots=True)
34+
@attr.s(auto_attribs=True, frozen=True)
3535
class DateTimeProperty(Property):
3636
"""
3737
A property of type datetime.datetime
@@ -53,7 +53,7 @@ def get_imports(self, *, prefix: str) -> Set[str]:
5353
return imports
5454

5555

56-
@attr.s(auto_attribs=True, frozen=True, slots=True)
56+
@attr.s(auto_attribs=True, frozen=True)
5757
class DateProperty(Property):
5858
""" A property of type datetime.date """
5959

@@ -73,7 +73,7 @@ def get_imports(self, *, prefix: str) -> Set[str]:
7373
return imports
7474

7575

76-
@attr.s(auto_attribs=True, frozen=True, slots=True)
76+
@attr.s(auto_attribs=True, frozen=True)
7777
class FileProperty(Property):
7878
""" A property used for uploading files """
7979

@@ -93,21 +93,21 @@ def get_imports(self, *, prefix: str) -> Set[str]:
9393
return imports
9494

9595

96-
@attr.s(auto_attribs=True, frozen=True, slots=True)
96+
@attr.s(auto_attribs=True, frozen=True)
9797
class FloatProperty(Property):
9898
""" A property of type float """
9999

100100
_type_string: ClassVar[str] = "float"
101101

102102

103-
@attr.s(auto_attribs=True, frozen=True, slots=True)
103+
@attr.s(auto_attribs=True, frozen=True)
104104
class IntProperty(Property):
105105
""" A property of type int """
106106

107107
_type_string: ClassVar[str] = "int"
108108

109109

110-
@attr.s(auto_attribs=True, frozen=True, slots=True)
110+
@attr.s(auto_attribs=True, frozen=True)
111111
class BooleanProperty(Property):
112112
""" Property for bool """
113113

@@ -117,7 +117,7 @@ class BooleanProperty(Property):
117117
InnerProp = TypeVar("InnerProp", bound=Property)
118118

119119

120-
@attr.s(auto_attribs=True, frozen=True, slots=True)
120+
@attr.s(auto_attribs=True, frozen=True)
121121
class ListProperty(Property, Generic[InnerProp]):
122122
""" A property representing a list (array) of other properties """
123123

@@ -149,7 +149,7 @@ def get_imports(self, *, prefix: str) -> Set[str]:
149149
return imports
150150

151151

152-
@attr.s(auto_attribs=True, frozen=True, slots=True)
152+
@attr.s(auto_attribs=True, frozen=True)
153153
class UnionProperty(Property):
154154
""" A property representing a Union (anyOf) of other properties """
155155

openapi_python_client/parser/properties/enum_property.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
ValueType = Union[str, int]
1212

1313

14-
@attr.s(auto_attribs=True, frozen=True, slots=True)
14+
@attr.s(auto_attribs=True, frozen=True)
1515
class EnumProperty(Property):
1616
""" A property that should use an enum """
1717

openapi_python_client/parser/properties/model_property.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from .property import Property
77

88

9-
@attr.s(auto_attribs=True, frozen=True, slots=True)
9+
@attr.s(auto_attribs=True, frozen=True)
1010
class ModelProperty(Property):
1111
""" A property which refers to another Schema """
1212

openapi_python_client/parser/properties/property.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from ... import utils
66

77

8-
@attr.s(auto_attribs=True, frozen=True, slots=True)
8+
@attr.s(auto_attribs=True, frozen=True)
99
class Property:
1010
"""
1111
Describes a single property for a schema

openapi_python_client/parser/properties/schemas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from .model_property import ModelProperty
1010

1111

12-
@attr.s(auto_attribs=True, frozen=True, slots=True)
12+
@attr.s(auto_attribs=True, frozen=True)
1313
class Schemas:
1414
""" Structure for containing all defined, shareable, and resuabled schemas (attr classes and Enums) """
1515

openapi_python_client/parser/responses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from .properties import NoneProperty, Property, Schemas, property_from_data
88

99

10-
@attr.s(auto_attribs=True, frozen=True, slots=True)
10+
@attr.s(auto_attribs=True, frozen=True)
1111
class Response:
1212
""" Describes a single response for an endpoint """
1313

0 commit comments

Comments
 (0)