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/02/02 21:49:51 UTC
[GitHub] [airflow] mik-laj opened a new pull request #7343: [AIRFLOW-6719]
Introduce pyupgrade to enforce latest syntax
mik-laj opened a new pull request #7343: [AIRFLOW-6719] Introduce pyupgrade to enforce latest syntax
URL: https://github.com/apache/airflow/pull/7343
---
Issue link: WILL BE INSERTED BY [boring-cyborg](https://github.com/kaxil/boring-cyborg)
Make sure to mark the boxes below before creating PR: [x]
- [ ] Description above provides context of the change
- [ ] Commit message/PR title starts with `[AIRFLOW-NNNN]`. AIRFLOW-NNNN = JIRA ID<sup>*</sup>
- [ ] Unit tests coverage for changes (not needed for documentation changes)
- [ ] Commits follow "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)"
- [ ] Relevant documentation is updated including usage instructions.
- [ ] I will engage committers as explained in [Contribution Workflow Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
<sup>*</sup> For document-only changes commit message can start with `[AIRFLOW-XXXX]`.
---
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).
Read the [Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines) for more information.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [airflow] ashb closed pull request #7343: [AIRFLOW-6719] Introduce
pyupgrade to enforce latest syntax
Posted by GitBox <gi...@apache.org>.
ashb closed pull request #7343: [AIRFLOW-6719] Introduce pyupgrade to enforce latest syntax
URL: https://github.com/apache/airflow/pull/7343
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [airflow] zhongjiajie commented on issue #7343: [AIRFLOW-6719]
Introduce pyupgrade to enforce latest syntax
Posted by GitBox <gi...@apache.org>.
zhongjiajie commented on issue #7343: [AIRFLOW-6719] Introduce pyupgrade to enforce latest syntax
URL: https://github.com/apache/airflow/pull/7343#issuecomment-592015585
@mik-laj Sure, but how could I do? submit a new PR to this repo? or create a PR to PolideaInternal:AIRFLOW-6719-pyupgrade?
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [airflow] zhongjiajie commented on a change in pull request #7343:
[AIRFLOW-6719] Introduce pyupgrade to enforce latest syntax
Posted by GitBox <gi...@apache.org>.
zhongjiajie commented on a change in pull request #7343: [AIRFLOW-6719] Introduce pyupgrade to enforce latest syntax
URL: https://github.com/apache/airflow/pull/7343#discussion_r385092821
##########
File path: airflow/providers/amazon/aws/operators/s3_delete_objects.py
##########
@@ -74,4 +74,16 @@ def __init__(
def execute(self, context):
s3_hook = S3Hook(aws_conn_id=self.aws_conn_id, verify=self.verify)
+<<<<<<< HEAD
s3_hook.delete_objects(bucket=self.bucket, keys=self.keys)
+=======
+
+ response = s3_hook.delete_objects(bucket=self.bucket, keys=self.keys)
+
+ deleted_keys = [x['Key'] for x in response.get("Deleted", [])]
+ self.log.info("Deleted: %s", deleted_keys)
+
+ if "Errors" in response:
+ errors_keys = [x['Key'] for x in response.get("Errors", [])]
+ raise AirflowException(f"Errors when deleting: {errors_keys}")
+>>>>>>> b18ba328b... [AIRFLOW-6719] Introduce pyupgrade to enforce latest syntax
Review comment:
It fail as you said, not that easy, but this is rebase mistake
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [airflow] mik-laj commented on issue #7343: [AIRFLOW-6719]
Introduce pyupgrade to enforce latest syntax
Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #7343: [AIRFLOW-6719] Introduce pyupgrade to enforce latest syntax
URL: https://github.com/apache/airflow/pull/7343#issuecomment-591949011
@zhongjiajie I don't have time to finish this, because I've taken care of the scheduler performance. You want to take over?
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [airflow] ashb commented on issue #7343: [AIRFLOW-6719] Introduce
pyupgrade to enforce latest syntax
Posted by GitBox <gi...@apache.org>.
ashb commented on issue #7343: [AIRFLOW-6719] Introduce pyupgrade to enforce latest syntax
URL: https://github.com/apache/airflow/pull/7343#issuecomment-592476524
Closed in favour of #7573
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [airflow] mik-laj commented on issue #7343: [AIRFLOW-6719]
Introduce pyupgrade to enforce latest syntax
Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #7343: [AIRFLOW-6719] Introduce pyupgrade to enforce latest syntax
URL: https://github.com/apache/airflow/pull/7343#issuecomment-581182416
The first build is unlikely to be valid because pyupgrade introduces changes incompatible with flake8, but I want to check it on CI.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [airflow] mik-laj edited a comment on issue #7343: [AIRFLOW-6719]
Introduce pyupgrade to enforce latest syntax
Posted by GitBox <gi...@apache.org>.
mik-laj edited a comment on issue #7343: [AIRFLOW-6719] Introduce pyupgrade to enforce latest syntax
URL: https://github.com/apache/airflow/pull/7343#issuecomment-591949011
@zhongjiajie I don't have time to finish this, because I've taken care of the scheduler performance. Would you like to take over?
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [airflow] mik-laj commented on issue #7343: [AIRFLOW-6719]
Introduce pyupgrade to enforce latest syntax
Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #7343: [AIRFLOW-6719] Introduce pyupgrade to enforce latest syntax
URL: https://github.com/apache/airflow/pull/7343#issuecomment-592090216
@mik-laj please create new PR to apache/airflow but reuse JIRA number.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [airflow] zhongjiajie commented on a change in pull request #7343:
[AIRFLOW-6719] Introduce pyupgrade to enforce latest syntax
Posted by GitBox <gi...@apache.org>.
zhongjiajie commented on a change in pull request #7343: [AIRFLOW-6719] Introduce pyupgrade to enforce latest syntax
URL: https://github.com/apache/airflow/pull/7343#discussion_r385093470
##########
File path: tests/providers/amazon/aws/operators/test_sftp_to_s3.py
##########
@@ -81,7 +81,7 @@ def test_sftp_to_s3_operation(self):
create_file_task = SSHOperator(
task_id="test_create_file",
ssh_hook=self.hook,
- command="echo '{0}' > {1}".format(test_remote_file_content,
+ command="echo '{}' > {}".format(test_remote_file_content,
self.sftp_path),
Review comment:
```suggestion
self.sftp_path),
```
```log
tests/providers/amazon/aws/operators/test_sftp_to_s3.py:85:47: E127 continuation line over-indented for visual indent
tests/models/test_taskinstance.py:318:45: E128 continuation line under-indented for visual indent
airflow/ti_deps/deps/runnable_exec_date_dep.py:38:47: E127 continuation line over-indented for visual indent
tests/providers/sftp/operators/test_sftp.py:214:47: E127 continuation line over-indented for visual indent
tests/providers/sftp/operators/test_sftp.py:252:47: E127 continuation line over-indented for visual indent
tests/providers/sftp/operators/test_sftp.py:291:47: E127 continuation line over-indented for visual indent
tests/providers/sftp/operators/test_sftp.py:327:47: E127 continuation line over-indented for visual indent
airflow/cli/commands/dag_command.py:85:50: E127 continuation line over-indented for visual indent
airflow/ti_deps/deps/dag_ti_slots_available_dep.py:33:57: E127 continuation line over-indented for visual indent
airflow/providers/sftp/operators/sftp.py:139:57: E127 continuation line over-indented for visual indent
airflow/providers/sftp/operators/sftp.py:150:57: E127 continuation line over-indented for visual indent
airflow/ti_deps/deps/not_in_retry_period_dep.py:52:41: E127 continuation line over-indented for visual indent
```
----------------------------------------------------------------
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
With regards,
Apache Git Services