Skip to content

Commit 4f1cbe4

Browse files
committed
use 4 spaces for python code block
1 parent 8e9c36a commit 4f1cbe4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -182,24 +182,24 @@ import typing
182182
from graphene_pydantic import PydanticObjectType
183183

184184
class Pet:
185-
pass
185+
pass
186186

187187
class Person:
188-
name: str
189-
pets_by_name: typing.Dict[str, Pet]
188+
name: str
189+
pets_by_name: typing.Dict[str, Pet]
190190

191191
class GraphQLPerson(PydanticObjectType):
192-
class Meta:
193-
model = Person
192+
class Meta:
193+
model = Person
194194
```
195195

196196
However, note that if you use `exclude_fields` or `only_fields` to exclude those values, there won't be a problem:
197197

198198
``` python
199199
class GraphQLPerson(PydanticObjectType):
200-
class Meta:
201-
model = Person
202-
exclude_fields = ("pets_by_name",)
200+
class Meta:
201+
model = Person
202+
exclude_fields = ("pets_by_name",)
203203
```
204204

205205
#### Union types

0 commit comments

Comments
 (0)