Browse Source

type to isinstance

pull/13466/head
Max 2 months ago
committed by GitHub
parent
commit
342021c587
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      fastapi/routing.py

2
fastapi/routing.py

@ -533,7 +533,7 @@ class APIRoute(routing.Route):
# truncate description text to the content preceding the first "form feed" # truncate description text to the content preceding the first "form feed"
self.description = ( self.description = (
self.description.split("\f")[0].strip() self.description.split("\f")[0].strip()
if type(self.description) is str if isinstance(self.description, str)
else self.description else self.description
) )
response_fields = {} response_fields = {}

Loading…
Cancel
Save