Consider merging collapsible
With
statements` 72 col1, col2, col3 = st.columns([1,2,1])
73 with col1:
74 st_lottie(lottie_dancing, key="dance_left")
75 with col2: 76 with col2:
77 st.image('logo_grey.png')
78 st.markdown("<h3 style='text-align: center; color: #ff008c;'>Your personal AI<br/>synchronisation assistant.</h3>", unsafe_allow_html=True)
Description
Nested with
statements can be merged into a single compound with
statement.
This issue is raised only when there are no other statements between the nested with
statements.
Merging collapsible with
statements can decrease cognitive complexity, improving code readability.
Bad practice
with open("file1", "w") as file1:
with open("file2", "w") as file2:
doSomething()
Preferred
with open("file1", "w") as file1, open("file2", "w") as file2:
doSomething()