Update conditional_rendering.md#1772
Conversation
list[str] is preferred for cleaner code for modern python (3.9+) instead of importing List and use List[str]
Greptile SummaryThis PR updates the
Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[MatchState.cat_breed] --> B{rx.match}
B -->|"persian"| C[rx.text: Persian cat selected.]
B -->|"siamese"| D[rx.text: Siamese cat selected.]
B -->|"maine coon"| E[rx.text: Maine Coon cat selected.]
B -->|"ragdoll"| F[rx.text: Ragdoll cat selected.]
B -->|default| G[rx.text: Unknown cat breed selected.]
Last reviewed commit: 69b3ca9 |
| ```python demo exec | ||
| from typing import List | ||
|
|
||
|
|
||
| import reflex as rx |
There was a problem hiding this comment.
Extra blank line at top of code block
Removing from typing import List is the right call, but replacing it with an empty line leaves two consecutive blank lines at the start of the code block (the replacement blank line plus the separator blank line that was already there). The cleaner fix is to drop the line entirely rather than substituting it with whitespace.
| ```python demo exec | |
| from typing import List | |
| import reflex as rx | |
| ```python demo exec | |
| import reflex as rx | |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
list[str] is preferred for cleaner code for modern python (3.9+) instead of importing List and use List[str]