Skip to content

Commit 96172c2

Browse files
emanndbanty
andauthored
Added auto_attribs=True to Client classes (#193)
* Added auto_attribs=True to Client classes * Update openapi_python_client/templates/client.pyi Co-authored-by: Dylan Anthony <[email protected]> * Regenerated the golden record * Regenerated golden record one more time Co-authored-by: Ethan Mann <[email protected]> Co-authored-by: Dylan Anthony <[email protected]>
1 parent 1a95016 commit 96172c2

File tree

2 files changed

+4
-4
lines changed
  • end_to_end_tests/golden-record/my_test_api_client
  • openapi_python_client/templates

2 files changed

+4
-4
lines changed

end_to_end_tests/golden-record/my_test_api_client/client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import attr
44

55

6-
@attr.s
6+
@attr.s(auto_attribs=True)
77
class Client:
88
""" A class for keeping track of data related to the API """
99

@@ -35,7 +35,7 @@ def with_timeout(self, timeout: float) -> "Client":
3535
return attr.evolve(self, timeout=timeout)
3636

3737

38-
@attr.s
38+
@attr.s(auto_attribs=True)
3939
class AuthenticatedClient(Client):
4040
""" A Client which has been authenticated for use on secured endpoints """
4141

openapi_python_client/templates/client.pyi

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ from typing import Dict
22

33
import attr
44

5-
@attr.s
5+
@attr.s(auto_attribs=True)
66
class Client:
77
""" A class for keeping track of data related to the API """
88

@@ -33,7 +33,7 @@ class Client:
3333
""" Get a new client matching this one with a new timeout (in seconds) """
3434
return attr.evolve(self, timeout=timeout)
3535

36-
@attr.s
36+
@attr.s(auto_attribs=True)
3737
class AuthenticatedClient(Client):
3838
""" A Client which has been authenticated for use on secured endpoints """
3939

0 commit comments

Comments
 (0)