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

   <!-- Bito Reply -->
   The suggestion to update the `user` parameter annotation in 
`superset/utils/screenshots.py` is correct. The current type hint `user: User` 
implies it is mandatory, but the implementation allows it to be passed as 
`None` from other modules. To resolve this, update the type hint to `user: User 
| None`.
   
   Would you like me to implement this fix for you? If so, I can also check the 
rest of the PR for similar issues and apply fixes if you approve.
   
   **superset/utils/screenshots.py**
   ```
   def get_screenshot(
           self,
           user: User | None,
           window_size: WindowSize | None = None,
           log_context: str | None = None,
       ) -> bytes | None:
   ```


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