-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(utils/decorators): rewrite remove task decorator to use cst #43383
base: main
Are you sure you want to change the base?
Conversation
991cccc
to
4e926d5
Compare
d5e6684
to
606b2ea
Compare
1ec8a0a
to
28d8f2c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we decide to use CST, just mark it as draft
28d8f2c
to
2a82c10
Compare
2a82c10
to
f2cbefa
Compare
292076c
to
066d757
Compare
@@ -192,25 +192,25 @@ def test_should_create_virtualenv_with_extra_packages_uv(self, mock_execute_in_s | |||
) | |||
|
|||
def test_remove_task_decorator(self): | |||
py_source = '@task.virtualenv(serializer="dill")\ndef f():\nimport funcsigs' | |||
py_source = '@task.virtualenv(serializer="dill")\ndef f():\n import funcsigs' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note. the original syntax is invalid due to the indentation error.
066d757
to
324301b
Compare
providers/standard/tests/provider_tests/standard/utils/test_python_virtualenv.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Wei Lee <[email protected]>
Co-authored-by: Wei Lee <[email protected]>
Co-authored-by: Wei Lee <[email protected]>
6631ea8
to
bc09e4b
Compare
@@ -192,25 +193,77 @@ def test_should_create_virtualenv_with_extra_packages_uv(self, mock_execute_in_s | |||
) | |||
|
|||
def test_remove_task_decorator(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nits: we probably could refactor these cases through pytest.mark.parametrize
(remember to use id to make it more readable)
due to #42766 the dropping of python3.8 support, I rewrite the
remove_task_decorator
to achieve the same purpose through CST.TODO:
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.