You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/09/26 01:27:21 UTC
[GitHub] [airflow] mlgruby opened a new pull request #11159: Increasing type coverage for multiple provider
mlgruby opened a new pull request #11159:
URL: https://github.com/apache/airflow/pull/11159
Increasing type coverage for multiple providers. Part of: #9708
cc: @kaxil can I request you to review this.
<!--
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/master/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/master/UPDATING.md).
---
0.000000 dingding
0.000000 opsgenie
0.000000 presto
0.000000 qubole
0.000000 samba
0.000000 zendesk
16.666650 ssh
16.666667 oracle
16.666667 yandex
16.666700 odbc
21.428550 databricks
25.000000 exasol
25.000000 singularity
41.074865 amazon
52.078754 microsoft
69.100860 google
75.000000 jdbc
75.000000 postgres
77.678575 slack ===================> from 27 to 77
80.625000 ftp
82.449500 cncf ====================> from 67 to 82
83.333300 openfaas
87.421875 apache
87.500000 redis
88.333340 mysql
88.888900 papermill
90.909100 elasticsearch
96.428575 salesforce
96.875000 mongo
98.076900 imap
100.000000 celery
100.000000 cloudant
100.000000 datadog
100.000000 discord
100.000000 docker
100.000000 facebook
100.000000 grpc
100.000000 hashicorp
100.000000 http
100.000000 jenkins
100.000000 jira
100.000000 pagerduty
100.000000 plexus ================> from 41 to 100
100.000000 segment
100.000000 sendgrid
100.000000 sftp ==================> from 33 to 100
100.000000 snowflake =============> from 25 to 100
100.000000 sqlite
100.000000 vertica
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [airflow] kaxil commented on pull request #11159: Increasing type coverage for multiple provider
Posted by GitBox <gi...@apache.org>.
kaxil commented on pull request #11159:
URL: https://github.com/apache/airflow/pull/11159#issuecomment-699470297
> in static check CI, `mypy` is throwing the same error which `pylint` is set to ignore. Can we ignore this `mypy` error?
yea go for it
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [airflow] mik-laj commented on pull request #11159: Increasing type coverage for multiple provider
Posted by GitBox <gi...@apache.org>.
mik-laj commented on pull request #11159:
URL: https://github.com/apache/airflow/pull/11159#issuecomment-699461611
@in static check CI, mypy is throwing the same error which pylint is set to ignore. Can we ignore this mypy error?
```
airflow/providers/snowflake/hooks/snowflake.py:55: error: "SnowflakeHook" has
no attribute "snowflake_conn_id"
conn = self.get_connection(self.snowflake_conn_id) # pylint: ...
^
airflow/providers/snowflake/hooks/snowflake.py:129: error: "SnowflakeHook" has
no attribute "snowflake_conn_id"
if self.snowflake_conn_id: # pylint: disable=no-member
^
airflow/providers/snowflake/hooks/snowflake.py:130: error: "SnowflakeHook" has
no attribute "snowflake_conn_id"
... connection_object = self.get_connection(self.snowflake_conn_i...
```
Yes. These errors can be ignored by `typing: ignore` because we're sure these attributes exist but are dynamically created.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [airflow] mlgruby commented on pull request #11159: Increasing type coverage for multiple provider
Posted by GitBox <gi...@apache.org>.
mlgruby commented on pull request #11159:
URL: https://github.com/apache/airflow/pull/11159#issuecomment-699475342
> > in static check CI, `mypy` is throwing the same error which `pylint` is set to ignore. Can we ignore this `mypy` error?
>
> yea go for it
Can you please approve this
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [airflow] mlgruby commented on pull request #11159: Increasing type coverage for multiple provider
Posted by GitBox <gi...@apache.org>.
mlgruby commented on pull request #11159:
URL: https://github.com/apache/airflow/pull/11159#issuecomment-699475292
> @in static check CI, mypy is throwing the same error which pylint is set to ignore. Can we ignore this mypy error?
>
> ```
> airflow/providers/snowflake/hooks/snowflake.py:55: error: "SnowflakeHook" has
> no attribute "snowflake_conn_id"
> conn = self.get_connection(self.snowflake_conn_id) # pylint: ...
> ^
> airflow/providers/snowflake/hooks/snowflake.py:129: error: "SnowflakeHook" has
> no attribute "snowflake_conn_id"
> if self.snowflake_conn_id: # pylint: disable=no-member
> ^
> airflow/providers/snowflake/hooks/snowflake.py:130: error: "SnowflakeHook" has
> no attribute "snowflake_conn_id"
> ... connection_object = self.get_connection(self.snowflake_conn_i...
> ```
>
> Yes. These errors can be ignored by `typing: ignore` because we're sure these attributes exist but are dynamically created.
Tried below solution but I am still getting above error!
```python
# type: ignore
conn = self.get_connection(self.snowflake_conn_id) # pylint: disable=no-member
```
and
```python
# type: ignore[attr-defined]
conn = self.get_connection(self.snowflake_conn_id) # pylint: disable=no-member
```
not sure how to put both pylint ignore and mypy ignore for the piece of code!
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [airflow] kaxil commented on pull request #11159: Increasing type coverage for multiple provider
Posted by GitBox <gi...@apache.org>.
kaxil commented on pull request #11159:
URL: https://github.com/apache/airflow/pull/11159#issuecomment-699504255
Good work Satya
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [airflow] mlgruby edited a comment on pull request #11159: Increasing type coverage for multiple provider
Posted by GitBox <gi...@apache.org>.
mlgruby edited a comment on pull request #11159:
URL: https://github.com/apache/airflow/pull/11159#issuecomment-699484147
added `type: ignore[attr-defined]` in order to ignore attribute error only and not silence other unexpected errors.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [airflow] mlgruby commented on pull request #11159: Increasing type coverage for multiple provider
Posted by GitBox <gi...@apache.org>.
mlgruby commented on pull request #11159:
URL: https://github.com/apache/airflow/pull/11159#issuecomment-699484147
added `type: ignore[attr-defined]` in order to ignore attribute error only and not silence unexpected errors.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [airflow] mlgruby edited a comment on pull request #11159: Increasing type coverage for multiple provider
Posted by GitBox <gi...@apache.org>.
mlgruby edited a comment on pull request #11159:
URL: https://github.com/apache/airflow/pull/11159#issuecomment-699475342
> > in static check CI, `mypy` is throwing the same error which `pylint` is set to ignore. Can we ignore this `mypy` error?
>
> yea go for it
Can you please review this
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [airflow] mlgruby commented on pull request #11159: Increasing type coverage for multiple provider
Posted by GitBox <gi...@apache.org>.
mlgruby commented on pull request #11159:
URL: https://github.com/apache/airflow/pull/11159#issuecomment-699453945
in static check CI, `mypy` is throwing the same error which `pylint` is set to ignore. Can we ignore this `mypy` error?
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [airflow] kaxil commented on pull request #11159: Increasing type coverage for multiple provider
Posted by GitBox <gi...@apache.org>.
kaxil commented on pull request #11159:
URL: https://github.com/apache/airflow/pull/11159#issuecomment-699481260
Pushed a fix :)
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [airflow] kaxil merged pull request #11159: Increasing type coverage for multiple provider
Posted by GitBox <gi...@apache.org>.
kaxil merged pull request #11159:
URL: https://github.com/apache/airflow/pull/11159
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [airflow] mlgruby edited a comment on pull request #11159: Increasing type coverage for multiple provider
Posted by GitBox <gi...@apache.org>.
mlgruby edited a comment on pull request #11159:
URL: https://github.com/apache/airflow/pull/11159#issuecomment-699475292
> @in static check CI, mypy is throwing the same error which pylint is set to ignore. Can we ignore this mypy error?
>
> ```
> airflow/providers/snowflake/hooks/snowflake.py:55: error: "SnowflakeHook" has
> no attribute "snowflake_conn_id"
> conn = self.get_connection(self.snowflake_conn_id) # pylint: ...
> ^
> airflow/providers/snowflake/hooks/snowflake.py:129: error: "SnowflakeHook" has
> no attribute "snowflake_conn_id"
> if self.snowflake_conn_id: # pylint: disable=no-member
> ^
> airflow/providers/snowflake/hooks/snowflake.py:130: error: "SnowflakeHook" has
> no attribute "snowflake_conn_id"
> ... connection_object = self.get_connection(self.snowflake_conn_i...
> ```
>
> Yes. These errors can be ignored by `typing: ignore` because we're sure these attributes exist but are dynamically created.
Tried below solution but I am still getting above error!
```python
# type: ignore
conn = self.get_connection(self.snowflake_conn_id) # pylint: disable=no-member
```
and
```python
# type: ignore[attr-defined]
conn = self.get_connection(self.snowflake_conn_id) # pylint: disable=no-member
```
The second one I prefer as in this way we are less likely to silence unexpected errors that are not safe to ignore.
Not sure how to put both pylint ignore and mypy ignore for the piece of code!
----------------------------------------------------------------
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:
users@infra.apache.org