Skip to content
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

Partially resolve builtin variable shadowing (A001) #39278

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Taragolis
Copy link
Contributor

We have plenty of the builtins variables/function with the same name as a builtins functions or constants .
This PR rename it into the non production codebase (dev, tests) and ignore into the existed one in core/providers module.


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

@Taragolis Taragolis added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Apr 26, 2024
@@ -958,7 +958,7 @@ def down(preserve_volumes: bool, cleanup_mypy_cache: bool, project_name: str):
@option_verbose
@option_dry_run
@click.argument("exec_args", nargs=-1, type=click.UNPROCESSED)
def exec(exec_args: tuple):
def exec_(exec_args: tuple):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I like the change! But as a nit: I am not a big fan of just adding a _ as suffix, it feels weird to me. Non blocking though, if others feel it is fine, I am fine

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for late response, basically its suggestion from PEP8 or pycodestyle or something similar, I do not really remember when it comes from originally

Particular in this case it is not really matter how to named it because there is interface to cli and not intended to be called directly, I just want to keep original name as close as possible to exec which refers to the breeze exec

In the another word I do not have any preferences, so if there is any better naming I could easy rename it

Copy link
Member

@uranusjr uranusjr Jun 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this change specifically is good, but there are some variables below that could use a better rename than just an underscore suffix.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are only two hard things in Computer Science: cache invalidation and naming things

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW in this place it could be replaced by exec -> execute

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are only two hard things in Computer Science: cache invalidation and naming things

And off-by-one mistakes

Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Jun 15, 2024
@uranusjr uranusjr removed the stale Stale PRs per the .github/workflows/stale.yml policy file label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:dev-tools area:logging area:providers changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) provider:amazon-aws AWS/Amazon - related issues provider:elasticsearch provider:google Google (including GCP) related issues provider:microsoft-azure Azure-related issues provider:openlineage AIP-53
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants