EnxDev commented on code in PR #45205:
URL: https://github.com/apache/superset/pull/45205#discussion_r4256849574


##########
tests/unit_tests/db_engine_specs/test_crdb.py:
##########
@@ -29,16 +27,19 @@
     [
         ("Date", "'2019-01-02'"),
         ("TimeStamp", "'2019-01-02 03:04:05'"),
+        ("DateTime", "'2019-01-02 03:04:05'"),
+        ("String", "'2019-01-02 03:04:05'"),
+        ("Text", "'2019-01-02 03:04:05'"),
         ("UnknownType", None),
     ],
 )
 def test_convert_dttm(
     target_type: str,
-    expected_result: Optional[str],
+    expected_result: str | None,
     dttm: datetime,  # noqa: F811
 ) -> None:
     from superset.db_engine_specs.cockroachdb import (
-        CockroachDbEngineSpec as spec,  # noqa: N813
+        CockroachDbEngineSpec as spec,

Review Comment:
   Dropping the `# noqa: N813` here is what turned pre-commit red on this 
commit. Ruff still flags the `as spec` alias.
   
   ```suggestion
           CockroachDbEngineSpec as spec,  # noqa: N813
   ```
   
   The blank line that went missing after `import pytest` trips I001 too. 
`pre-commit run` puts that one back for you.



##########
tests/unit_tests/db_engine_specs/test_oceanbase.py:
##########
@@ -50,12 +49,21 @@
 def test_get_column_spec(
     native_type: str,
     sqla_type: type[types.TypeEngine],
-    attrs: Optional[dict[str, Any]],
+    attrs: dict[str, Any] | None,
     generic_type: GenericDataType,
     is_dttm: bool,
 ) -> None:
     from superset.db_engine_specs.oceanbase import (
-        OceanBaseEngineSpec as spec,  # noqa: N813
+        OceanBaseEngineSpec as spec,

Review Comment:
   Same thing here, plus the blank line after the `sqlalchemy` import.
   
   ```suggestion
           OceanBaseEngineSpec as spec,  # noqa: N813
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to