RaphCodec commented on code in PR #64422:
URL: https://github.com/apache/airflow/pull/64422#discussion_r3696660113


##########
providers/git/src/airflow/providers/git/hooks/git.py:
##########
@@ -183,6 +216,82 @@ def _build_ssh_command(self, key_path: str | None = None) 
-> str:
 
         return " ".join(parts)
 
+    def _get_github_app_token(self):

Review Comment:
   Adding the return annotation here causes a mypy error.  This can be fixed by 
intentionally casting the app_id and installation_id as str or int respectively 
(` self.github_installation_id: int | None = 
int(extra["github_installation_id"]) if extra.get("github_installation_id") 
else None`).  However that would go against prior suggestions to let the 
PyGitHub library handle the validation for these inputs.
   
   ```python
   providers/git/src/airflow/providers/git/hooks/git.py:226: error: Argument
     "app_id" to "AppAuth" has incompatible type "Any | None"; expected "int | 
str" 
     [arg-type]
                 auth = Auth.AppAuth(app_id=self.github_app_id, 
private_key=sel...
   ```



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

Reply via email to