bito-code-review[bot] commented on PR #41759:
URL: https://github.com/apache/superset/pull/41759#issuecomment-4881044847

   <!-- Bito Reply -->
   The suggestion to add explicit type annotations for `sql_match` and 
`query_string` is valid, as these variables are introduced in the middleware 
and currently lack explicit type hints. You can resolve this by annotating them 
as follows:
   
   ```python
           if sql_match := _LEGACY_SQL_RE.match(canonical_after_strip):
               if method != "GET":
                   return _response_with_location(410, None)(environ, 
start_response)
               location: str = 
f"{self.app_root_prefix}/sqllab/?dbid={sql_match.group(1)}"
               query_string: str = environ.get("QUERY_STRING", "")
               if query_string:
                   location = f"{location}&{query_string}"
               return _response_with_location(308, location)(environ, 
start_response)
   ```
   
   Regarding other comments on this PR, there are no additional review comments 
available in the provided context to address.
   
   **superset/middleware/legacy_prefix_redirect.py**
   ```
   location: str = f"{self.app_root_prefix}/sqllab/?dbid={sql_match.group(1)}"
               query_string: str = environ.get("QUERY_STRING", "")
               if query_string:
                   location = f"{location}&{query_string}"
   ```


-- 
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