-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Duplicate Flags in Makefile #11662
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
Duplicate Flags in Makefile #11662
Conversation
changes made to the code are as follows: 1. The regular expression r"\smypy_boto3_([a-z0-9_]+)\s" looks for occurrences of mypy_boto3_ followed by alphanumeric characters and underscores. This pattern assumes that there will always be a space before and after the match. However, if mypy_boto3_ appears at the beginning of a line or is surrounded by something other than spaces (like parentheses, quotes, etc.), it won't match. A slightly more robust regex could be: r"mypy_boto3_([a-z0-9_]+)", which would match mypy_boto3_ patterns regardless of their surrounding whitespace. 2. No Output If No Match: If result is empty (i.e., no match is found), the script will still print pip install "boto3-stubs[]". It would be better to check if result contains items before printing the pip install command.
Duplicate Flags: In the upgrade-pinned-dependencies target, --strip-extras is specified twice in the pip-compile commands: ```bash $(VENV_RUN); pip-compile --strip-extras --upgrade --strip-extras -o requirements-basic.txt pyproject.toml ```
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.
Hello and thanks for your contribution! Are you using an automated tool for grammar? It seems it was a bit too eager and changed things that do not make sense anymore. Could you revert the commented changes?
I'll ping @silv-io for the change in the Makefile in particular!
edit: I realize some of these changes have been already merged, as your commits are 3 weeks old. There also are some merge conflicts. Could you please rebase your PR?
localstack-core/localstack/config.py
Outdated
@@ -338,7 +338,7 @@ def in_docker(): | |||
if os_hostname and os_hostname in content: | |||
return True | |||
|
|||
# containerd does not set any specific file or config, but does use | |||
# container does not set any specific file or config, but it does use |
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.
This is a wrong automated change, we are indeed talking about containerd
localstack-core/localstack/config.py
Outdated
@@ -375,7 +375,7 @@ def in_docker(): | |||
return False | |||
|
|||
|
|||
# whether the in_docker check should always return True or False | |||
# whether in_docker check should always return True or False |
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.
I believe the readability is worse with this change
localstack-core/localstack/config.py
Outdated
# will resolve to the real DNS entry, rather than the local one. | ||
# will resolve it to the real DNS entry, rather than the local one. |
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.
this is a wrong change, the sentence is "Any DNS name not matched * will resolve to the... ", the it does not make sense
localstack-core/localstack/config.py
Outdated
internal use. This function is also not needed anymore because we don't separate between HTTP | ||
and HTTP ports anymore since LocalStack listens to both.""" | ||
internal use. This function is not needed anymore because we don't separate between HTTP | ||
and HTTP ports anymore since LocalStack comprehends to both.""" |
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.
this change does not make sense, this talks about listening to a port, and this does not mean anything?
@@ -33,7 +33,7 @@ | |||
# Artifacts endpoint | |||
ASSETS_ENDPOINT = "https://assets.localstack.cloud" | |||
|
|||
# host to bind to when starting the services | |||
# host to bind when starting the services |
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.
this is wrong, we "bind to" a host and not bind a host
@@ -327,7 +327,7 @@ def deprecated_endpoint( | |||
endpoint: Callable, previous_path: str, deprecation_version: str, new_path: str | |||
) -> Callable: | |||
""" | |||
Wrapper function which logs a warning (and a deprecation path) whenever a deprecated URL is invoked by a router. | |||
Wrapper function which logs a warning (and a deprecation path) whenever a deprecated URL is invoked by the router. |
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.
we can have different routers, so a
is more correct
|
||
print(f'pip install "boto3-stubs[{",".join(result)}]"', end="") | ||
if os.path.exists(filepath): |
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.
why is this change needed? could you explain it?
localstack-core/localstack/config.py
Outdated
@@ -32,8 +32,8 @@ | |||
|
|||
class Directories: | |||
""" | |||
Holds the different directories available to localstack. Some directories are shared between the host and the | |||
localstack container, some live only on the host and some only in the container. | |||
Holds different directories available to localstack. Some directories are shared between the host and the |
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.
remove the the
makes it a bit less readable in my opinion
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.
The change in the Make target looks good!
Before merging, I would just ask to remove all the other changes (seems like they were automated?) as they don't seem to be connected to the PR description and goal.
ok then shall i delete the files except the makefile one? |
@vignesh1507 yes, please just remove the changes outside of the Makefile :) |
@vignesh1507 I think there was a bit of a misunderstanding here. We would ask you to revert all the changes outside of the Makefile, not delete those files. To do that, you can do e.g.:
And then you can replace all occurrences of After that you can do |
Made a new PR (#11666 ) with only the makefile commit. |
Duplicate Flags: In the
upgrade-pinned-dependencies
target,--strip-extras
is specified twice in thepip-compile
commands: