he error you’re encountering, which is related to “unsorted/unformatted imports,” is a common coding convention issue. Many Python style guides recommend organizing your imports in a specific way to make your code more readable and maintainable.
In Python, the standard convention is to organize imports in the following order:
Standard Library Imports
Related Third-Party Imports
Local (Your Own) Imports
In your code snippet, it appears that you’re importing from both a third-party module (flet) and specific components within that module. To resolve the “unsorted/unformatted imports” error, you should organize your imports in the recommended order.
Here’s an example of how you can reorganize your imports:
# Standard Library Imports (if any)
# Related Third-Party Imports
from flet import Checkbox, Column, Container, Icon, Page, Row, Tab, Tabs, Text, TextField
# Local (Your Own) Imports (if any)
An easier way is to go to pyproject.toml and remove the 'I' from the select variable list, or you can just allow code intelligence to automatically fix it with the light bulb.
Code intelligence can be configured, and knowing how to is very useful.