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

removed azure- prefix from ua if there #523

Merged
merged 2 commits into from
Mar 26, 2020
Merged

Conversation

iscai-msft
Copy link
Contributor

fixes #479
Screen Shot 2020-03-25 at 12 08 14 PM

@iscai-msft iscai-msft requested a review from lmazuel March 25, 2020 16:10
@iscai-msft iscai-msft self-assigned this Mar 25, 2020
@@ -44,11 +44,17 @@ def _config_imports(async_mode: bool) -> FileImport:
# file_import.add_from_import("azure.core.credentials", "TokenCredential", ImportType.AZURECORE)
return file_import

package_name = self.code_model.options['package_name']
if package_name and package_name.startswith("azure-"):
package_name = package_name.replace("azure-", "", 1)
Copy link
Member

Choose a reason for hiding this comment

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

Slice syntax is usually more common

package_name = package_name[len("azure-"):]

@lmazuel lmazuel merged commit 5da35a3 into autorestv3 Mar 26, 2020
@lmazuel lmazuel deleted the remove_azure_prefix_ua branch March 26, 2020 19:34
iscai-msft added a commit that referenced this pull request Mar 26, 2020
…into add_async_multiapi_client

* 'autorestv3' of https://github.com/Azure/autorest.python:
  switiching version.py -> _version.py if we want to keep version file (#522)
  Update changelog (#526)
  removed azure- prefix from ua if there (#523)
  Declare kwargs reserved (#525)
  updating to m4 4.12.276 (#524)
  Add self as reserved keyword (#315)
  Freeze master to 2.7.8 (#258)
  No async flag (#95)
iscai-msft added a commit that referenced this pull request Mar 30, 2020
…into autorestv3

* 'autorestv3' of https://github.com/Azure/autorest.python:
  removed azure- prefix from ua if there (#523)
  Add self as reserved keyword (#315)
  Freeze master to 2.7.8 (#258)
  No async flag (#95)
iscai-msft added a commit that referenced this pull request Apr 1, 2020
…into generated_code_mypy_fixes

* 'autorestv3' of https://github.com/Azure/autorest.python:
  ChangeLog
  updated to testserver .19 (#529)
  Fix default value enum py3 (#532)
  switiching version.py -> _version.py if we want to keep version file (#522)
  Update changelog (#526)
  removed azure- prefix from ua if there (#523)
  Declare kwargs reserved (#525)
  updating to m4 4.12.276 (#524)
  Add self as reserved keyword (#315)
  Freeze master to 2.7.8 (#258)
  No async flag (#95)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants