Repository: tefra/xsdata

Issue:
Invalid generated code for subscriptable types and compound forward references
```python
@dataclass
class Ttype:
    class Meta:
        name = "ttype"

    content: list[object] = field(
        default_factory=list,
        metadata={
            "type": "Wildcard",
            "namespace": "##any",
            "mixed": True,
            "choices": (
                {
                    "name": "row",
                    "type": 'type["Ttype.Row"]',
                    "namespace": "myNS.tempuri.org",
                },
            ),
        },
    )
```

Discussion:
sonarcloud[bot]: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=tefra_xsdata&pullRequest=901) **Quality Gate passed**  
Kudos, no new issues were introduced!

[0 New issues](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=901&resolved=false&inNewCodePeriod=true)  
[0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=901&resolved=false&inNewCodePeriod=true)  
No data about Coverage  
[0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=901&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=tefra_xsdata&pullRequest=901)



Patch:
diff --git a/xsdata/formats/dataclass/filters.py b/xsdata/formats/dataclass/filters.py
index 72330bf1..97be9b90 100644
--- a/xsdata/formats/dataclass/filters.py
+++ b/xsdata/formats/dataclass/filters.py
@@ -480,7 +480,9 @@ class Filters:
         length and the additional pad is more than the max line length,
         wrap the text into multiple lines, avoiding breaking long words
         """
-        if data.startswith("Type[") and data.endswith("]"):
+        if (data.startswith("Type[") or data.startswith("type[")) and data.endswith(
+            "]"
+        ):
             return data if data[5] == '"' else data[5:-1]
 
         if data.startswith("Literal[") and data.endswith("]"):


Test patch:
diff --git a/tests/formats/dataclass/test_filters.py b/tests/formats/dataclass/test_filters.py
index 08b539e7..293fd699 100644
--- a/tests/formats/dataclass/test_filters.py
+++ b/tests/formats/dataclass/test_filters.py
@@ -921,6 +921,7 @@ class FiltersTests(FactoryTestCase):
             "level_two": {"a": 1},
             "list": [
                 {"type": "Type[object]"},
+                {"type": 'type["something"]'},
                 {"type": "Type[object] mpla"},
             ],
             "default": "1",
@@ -943,6 +944,9 @@ class FiltersTests(FactoryTestCase):
             '            "type": object,\n'
             "        },\n"
             "        {\n"
+            '            "type": type["something"],\n'
+            "        },\n"
+            "        {\n"
             '            "type": "Type[object] mpla",\n'
             "        },\n"
             "    ],\n"