Anvil Community Forum

[BETA] Don't add unwanted imports

The new editor appears to add import lines to forms when it sees its ‘standard’ imports are missing.

e.g. it will add:

import anvil.tables as tables
import anvil.tables.query as q
from anvil.tables import app_tables

Could it please not do that? (or at least have the option for me to disable it)? I take some care over how my imports are defined and I don’t like having that overridden.

1 Like

In my case, none of the editors imported after I initially removed.

However, I think this should really be a configuration. I hate to have to remove all those imports in every form, module and package I create in the client code since I don’t use server code in the client code.

I think the initial code for each form/module/package should be user-defined (except the necessary designer imports for forms of course).

1 Like

Just linking this related request: