In django I often use something like
in models.py or urls.py:
I don't use singlas later in code, this is just to run signals.py code with django. PyCharm marks this import as unused, and will delete it on every usage of "optimize import".
Is it possible to prevent PyCharm doing that? Any magic comment/annotation?