bito-code-review[bot] commented on code in PR #40130: URL: https://github.com/apache/superset/pull/40130#discussion_r3344699117
########## superset/migrations/versions/2026-05-08_12-10_3a8e6f2c1b95_add_deleted_at_to_tables.py: ########## @@ -0,0 +1,52 @@ +# Licensed to the Apache Software Foundation (ASF) under one Review Comment: <!-- Bito Reply --> The suggestion to rename the migration file is not necessary. Alembic identifies migration files by their revision ID (the alphanumeric string in the filename), not by the module name or the presence of hyphens in the timestamp prefix. The current naming convention is standard for Alembic and will not cause import issues. ########## superset/commands/dataset/restore.py: ########## @@ -0,0 +1,43 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +"""Command to restore a soft-deleted dataset.""" + +import logging + Review Comment: <!-- Bito Reply --> The suggestion to remove the unused logger and its import is appropriate, as it eliminates dead code and unnecessary dependencies, which improves code cleanliness. You can safely apply this change to keep the codebase lean. **superset/commands/dataset/restore.py** ``` import logging ``` ########## superset/datasets/filters.py: ########## @@ -51,3 +53,10 @@ def apply(self, query: Query, value: bool) -> Query: ) ) return query + + +class DatasetDeletedStateFilter(BaseDeletedStateFilter): # pylint: disable=too-few-public-methods + """Rison filter for the GET list that exposes soft-deleted datasets.""" + + arg_name = "dataset_deleted_state" + model = SqlaTable Review Comment: <!-- Bito Reply --> The reviewer's suggestion to add a type annotation is not required in this case. As you noted, the `model` attribute is already defined in the `BaseDeletedStateFilter` parent class, and the subclass assignment `model = SqlaTable` is correctly type-checked against that existing annotation. Following the established pattern used by the sibling filters is appropriate here. -- 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]
