File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1
1
from collections import OrderedDict
2
2
import copy
3
3
import os
4
- from textwrap import fill , indent
4
+ from textwrap import fill
5
5
6
6
from dash .development .base_component import _explicitize_args
7
7
from dash .exceptions import NonExistentEventException
@@ -455,10 +455,10 @@ def create_prop_docstring(
455
455
dict_part2 = "" .join ([desc_indent , "Or" , dict_part2 ])
456
456
dict_descr = "{} \n \n {}" .format (dict_part1 , dict_part2 )
457
457
458
- # ensures indent is correct
458
+ # ensures indent is correct if there is a second nested dict
459
459
current_indent = dict_descr .lstrip ("\n " ).find ("-" )
460
- if current_indent == len (indent_spacing ):
461
- dict_descr = indent ( dict_descr , " " )
460
+ if current_indent == len (indent_spacing ) + 4 :
461
+ dict_descr = "" . join ( " " + line for line in dict_descr . splitlines ( True ) )
462
462
463
463
return (
464
464
"\n {indent_spacing}- {name} ({dict_or_list}; {is_required}){colon}"
@@ -552,7 +552,6 @@ def shape_or_exact():
552
552
553
553
def map_js_to_py_types_flow_types (type_object ):
554
554
"""Mapping from the Flow js types to the Python type."""
555
-
556
555
return dict (
557
556
array = lambda : "list" ,
558
557
boolean = lambda : "boolean" ,
You can’t perform that action at this time.
0 commit comments