def test_deeply_enclosed_type_validates_with_bare_type_allows_empty(
    monkeypatch,
):
    """Ensure empty list is valid when list has enclosed type.

    list[T] will validate [T] but also an empty list []
    NOTE: It does not look right for me, but looks like it is valid.
    https://mypy-play.net/?gist=d16da1574497dbe585eab679f09432ef
    """

    class Extra(DictValue):
        plugins: list[str]

    class Database(DictValue):
        extra: Extra

    class Settings(Dynaconf):
        database: Database

    with monkeypatch.context() as m:
        m.setenv("DYNACONF_DATABASE__EXTRA__PLUGINS", "@json []")
        assert Settings().database.extra.plugins == []
Ensure empty list is valid when list has enclosed type.

    list[T] will validate [T] but also an empty list []
    NOTE: It does not look right for me, but looks like it is valid.
    https://mypy-play.net/?gist=d16da1574497dbe585eab679f09432ef
    
tests/test_typed.py