-
Notifications
You must be signed in to change notification settings - Fork 3k
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
{Pylint} Fix implicit-str-concat #30363
base: dev
Are you sure you want to change the base?
Conversation
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
@@ -292,7 +292,7 @@ def create_action(action_name, cache_behavior=None, cache_duration=None, header_ | |||
action = { | |||
"cache_key_query_string": { | |||
"parameters": { | |||
"type_name" "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" | |||
"type_nameDeliveryRuleCacheKeyQueryStringBehaviorActionParameters" |
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 original code seems to be wrong.
"type_nameDeliveryRuleCacheKeyQueryStringBehaviorActionParameters" | |
"type_name": "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" |
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.
Also missing ,
at the end of file.
Previously, type_nameDeliveryRuleCacheKeyQueryStringBehaviorActionParametersquery_string_behavior
was the first key of paramieters
@@ -102,7 +102,7 @@ def test_relay_hyco(self, resource_group): | |||
'loc': 'westus2', | |||
'rg': resource_group, | |||
'namespacename': self.create_random_name(prefix='relay-nscli', length=20), | |||
'tags': 'tag1=value1' 'tag2=value2', | |||
'tags': 'tag1=value1tag2=value2', |
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.
'tags': 'tag1=value1tag2=value2', | |
'tags': 'tag1=value1 tag2=value2', |
@@ -1136,7 +1136,7 @@ def load_arguments(self, _): | |||
c.argument('subnet_address_prefix', help='The subnet IP address prefix to use when creating a new VNet in CIDR format.') | |||
c.argument('nics', nargs='+', help='Names or IDs of existing NICs to attach to the VM. The first NIC will be designated as primary. If omitted, a new NIC will be created. If an existing NIC is specified, do not specify subnet, VNet, public IP or NSG.') | |||
c.argument('private_ip_address', help='Static private IP address (e.g. 10.0.0.5).') | |||
c.argument('public_ip_address', help='Name of the public IP address when creating one (default) or referencing an existing one. Can also reference an existing public IP by ID or specify "" for None (\'""\' in Azure CLI using PowerShell or --% operator). For Azure CLI using powershell core edition 7.3.4, specify '' or "" (--public-ip-address '' or --public-ip-address "")') | |||
c.argument('public_ip_address', help='Name of the public IP address when creating one (default) or referencing an existing one. Can also reference an existing public IP by ID or specify "" for None (\'""\' in Azure CLI using PowerShell or --% operator). For Azure CLI using powershell core edition 7.3.4, specify or "" (--public-ip-address or --public-ip-address "")') |
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.
c.argument('public_ip_address', help='Name of the public IP address when creating one (default) or referencing an existing one. Can also reference an existing public IP by ID or specify "" for None (\'""\' in Azure CLI using PowerShell or --% operator). For Azure CLI using powershell core edition 7.3.4, specify or "" (--public-ip-address or --public-ip-address "")') | |
c.argument('public_ip_address', help='Name of the public IP address when creating one (default) or referencing an existing one. Can also reference an existing public IP by ID or specify "" for None (\'""\' in Azure CLI using PowerShell or --% operator). For Azure CLI using powershell core edition 7.3.4, specify or "" (--public-ip-address or --public-ip-address "")') |
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 '
character is missing. The help message is also not correct. In powershell, the empty string shoule be represented as '""'
.
@@ -185,7 +185,7 @@ def test_relay_wcfrelay(self, resource_group): | |||
'rg': resource_group, | |||
'relaytype': 'Http', | |||
'namespacename': self.create_random_name(prefix='relay-nscli', length=20), | |||
'tags': 'tag1=value1' 'tag2=value2', | |||
'tags': 'tag1=value1tag2=value2', |
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.
'tags': 'tag1=value1tag2=value2', | |
'tags': 'tag1=value1 tag2=value2', |
Fix this with
ruff check . --select ISC001 --fix
superfluous-parens was disabled in #26685
Ref:
https://pylint.readthedocs.io/en/stable/user_guide/messages/warning/implicit-str-concat.html
https://docs.astral.sh/ruff/rules/single-line-implicit-string-concatenation/