mlgruby commented on a change in pull request #11107:
URL: https://github.com/apache/airflow/pull/11107#discussion_r493818642



##########
File path: airflow/providers/ftp/hooks/ftp.py
##########
@@ -248,7 +248,7 @@ def get_mod_time(self, path: str) -> datetime.datetime:
         except ValueError:
             return datetime.datetime.strptime(time_val, '%Y%m%d%H%M%S')
 
-    def get_size(self, path):
+    def get_size(self, path: str) -> Union[int, str]:

Review comment:
       Your suggestion needs explicit casting of return statement to `int` 
   ```suggestion
       def get_size(self, path: str) -> Optional[int]:
           conn = self.get_conn()
           return int(conn.size(path) or 0)
   ```




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

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


Reply via email to