subkanthi opened a new pull request #20590:
URL: https://github.com/apache/airflow/pull/20590
Related: #19891
Fixes the following errors
`airflow/providers/amazon/aws/transfers/ftp_to_s3.py:121: error:
Incompatible types in assignment (expression has type "FTPHook", variable has
type "None")
self.ftp_hook = FTPHook(ftp_conn_id=self.ftp_conn_id)
^
airflow/providers/amazon/aws/transfers/ftp_to_s3.py:122: error: Incompatible
types in assignment (expression has type "S3Hook", variable has type "None")
self.s3_hook = S3Hook(self.aws_conn_id)
^
airflow/providers/amazon/aws/transfers/ftp_to_s3.py:128: error: "None" has
no attribute "list_directory"
list_dir = self.ftp_hook.list_directory(
^
airflow/providers/amazon/aws/transfers/gcs_to_s3.py:90: error: Incompatible
types in assignment (expression has type "Iterable[str]", base class
"BaseOperator"
defined the type as "Sequence[str]")
template_fields: Iterable[str] = (
^
Found 4 errors in 2 files (checked 18 source files)
root@4bf78e8bf974:/opt/airflow# mypy --namespace-packages
airflow/providers/amazon/aws/transfers
airflow/providers/amazon/aws/transfers/ftp_to_s3.py:135: error: Unsupported
operand types for in ("Union[str, List[str], None]" and "str")
files = list(filter(lambda file: self.ftp_filenames
in file, list_dir))
^
airflow/providers/amazon/aws/transfers/ftp_to_s3.py:141: error: Argument 2
to "replace" of "str" has incompatible type "Union[str, List[str]]"; expected
"str"
filename = file.replace(self.ftp_filenames,
self.s3_filenames)
^
airflow/providers/amazon/aws/transfers/gcs_to_s3.py:90: error: Incompatible
types in assignment (expression has type "Iterable[str]", base class
"BaseOperator"
defined the type as "Sequence[str]")
template_fields: Iterable[str] = (`
<!--
Thank you for contributing! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
In case of existing issue, reference it using one of the following:
closes: #ISSUE
related: #ISSUE
How to write a good git commit message:
http://chris.beams.io/posts/git-commit/
-->
---
**^ Add meaningful description above**
Read the **[Pull Request
Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)**
for more information.
In case of fundamental code change, Airflow Improvement Proposal
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals))
is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party
License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in
[UPDATING.md](https://github.com/apache/airflow/blob/main/UPDATING.md).
--
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]