How to make Pre-commit ignore when an element is not accessible?

I have this config in my app.rb :

from django.apps import AppConfig

class WebsiteConfig(AppConfig):
    default_auto_field = "django.db.models.BigAutoField"
    name = "website"

    def ready(self):
        import website.signals

The "website.signals" is not accessible (Pylance) because I am using docker. When the pre-commit is running, it will change my code to:

from django.apps import AppConfig

class WebsiteConfig(AppConfig):
    default_auto_field = "django.db.models.BigAutoField"
    name = "website"

    def ready(self):
        pass

How do I bypass this in general in my pyproject.toml?

I don't want to by pass only the file app.py but for any project I am working on, I want him to not pass if something looks like it is not accessible

Вернуться на верх