-
Notifications
You must be signed in to change notification settings - Fork 62
default to package name for setup.py's name #723
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...illa/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # coding=utf-8 | ||
| # -------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # Code generated by Microsoft (R) AutoRest Code Generator. | ||
| # Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
| # -------------------------------------------------------------------------- | ||
|
|
||
| from ._class_name import ClassName | ||
| from ._version import VERSION | ||
|
|
||
| __version__ = VERSION | ||
| __all__ = ['ClassName'] | ||
|
|
||
| try: | ||
| from ._patch import patch_sdk # type: ignore | ||
| patch_sdk() | ||
| except ImportError: | ||
| pass |
61 changes: 61 additions & 0 deletions
61
...a/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/_class_name.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # coding=utf-8 | ||
| # -------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # Code generated by Microsoft (R) AutoRest Code Generator. | ||
| # Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
| # -------------------------------------------------------------------------- | ||
|
|
||
| from typing import TYPE_CHECKING | ||
|
|
||
| from azure.core import PipelineClient | ||
| from msrest import Deserializer, Serializer | ||
|
|
||
| if TYPE_CHECKING: | ||
| # pylint: disable=unused-import,ungrouped-imports | ||
| from typing import Any, Optional | ||
|
|
||
| from ._configuration import ClassNameConfiguration | ||
| from .operations import ByteOperations | ||
| from . import models | ||
|
|
||
|
|
||
| class ClassName(object): | ||
| """Test Infrastructure for AutoRest Swagger BAT. | ||
|
|
||
| :ivar byte: ByteOperations operations | ||
| :vartype byte: bodybytewithpackagename.operations.ByteOperations | ||
| :param str base_url: Service URL | ||
| :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. | ||
| """ | ||
|
|
||
| def __init__( | ||
| self, | ||
| base_url=None, # type: Optional[str] | ||
| **kwargs # type: Any | ||
| ): | ||
| # type: (...) -> None | ||
| if not base_url: | ||
| base_url = 'http://localhost:3000' | ||
| self._config = ClassNameConfiguration(**kwargs) | ||
| self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) | ||
|
|
||
| client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} | ||
| self._serialize = Serializer(client_models) | ||
| self._deserialize = Deserializer(client_models) | ||
|
|
||
| self.byte = ByteOperations( | ||
| self._client, self._config, self._serialize, self._deserialize) | ||
|
|
||
| def close(self): | ||
| # type: () -> None | ||
| self._client.close() | ||
|
|
||
| def __enter__(self): | ||
| # type: () -> ClassName | ||
| self._client.__enter__() | ||
| return self | ||
|
|
||
| def __exit__(self, *exc_details): | ||
| # type: (Any) -> None | ||
| self._client.__exit__(*exc_details) |
51 changes: 51 additions & 0 deletions
51
...xpected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/_configuration.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # coding=utf-8 | ||
| # -------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # Code generated by Microsoft (R) AutoRest Code Generator. | ||
| # Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
| # -------------------------------------------------------------------------- | ||
|
|
||
| from typing import TYPE_CHECKING | ||
|
|
||
| from azure.core.configuration import Configuration | ||
| from azure.core.pipeline import policies | ||
|
|
||
| from ._version import VERSION | ||
|
|
||
| if TYPE_CHECKING: | ||
| # pylint: disable=unused-import,ungrouped-imports | ||
| from typing import Any | ||
|
|
||
|
|
||
| class ClassNameConfiguration(Configuration): | ||
| """Configuration for ClassName. | ||
|
|
||
| Note that all parameters used to create this instance are saved as instance | ||
| attributes. | ||
| """ | ||
|
|
||
| def __init__( | ||
| self, | ||
| **kwargs # type: Any | ||
| ): | ||
| # type: (...) -> None | ||
| super(ClassNameConfiguration, self).__init__(**kwargs) | ||
|
|
||
| kwargs.setdefault('sdk_moniker', 'package-name/{}'.format(VERSION)) | ||
| self._configure(**kwargs) | ||
|
|
||
| def _configure( | ||
| self, | ||
| **kwargs # type: Any | ||
| ): | ||
| # type: (...) -> None | ||
| self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) | ||
| self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) | ||
| self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) | ||
| self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) | ||
| self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) | ||
| self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) | ||
| self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) | ||
| self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) | ||
| self.authentication_policy = kwargs.get('authentication_policy') |
9 changes: 9 additions & 0 deletions
9
...illa/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/_version.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # coding=utf-8 | ||
| # -------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # Code generated by Microsoft (R) AutoRest Code Generator. | ||
| # Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
| # -------------------------------------------------------------------------- | ||
|
|
||
| VERSION = "0.1.0" |
10 changes: 10 additions & 0 deletions
10
.../Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/aio/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # coding=utf-8 | ||
| # -------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # Code generated by Microsoft (R) AutoRest Code Generator. | ||
| # Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
| # -------------------------------------------------------------------------- | ||
|
|
||
| from ._class_name_async import ClassName | ||
| __all__ = ['ClassName'] |
53 changes: 53 additions & 0 deletions
53
.../AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/aio/_class_name_async.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # coding=utf-8 | ||
| # -------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # Code generated by Microsoft (R) AutoRest Code Generator. | ||
| # Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
| # -------------------------------------------------------------------------- | ||
|
|
||
| from typing import Any, Optional | ||
|
|
||
| from azure.core import AsyncPipelineClient | ||
| from msrest import Deserializer, Serializer | ||
|
|
||
| from ._configuration_async import ClassNameConfiguration | ||
| from .operations_async import ByteOperations | ||
| from .. import models | ||
|
|
||
|
|
||
| class ClassName(object): | ||
| """Test Infrastructure for AutoRest Swagger BAT. | ||
|
|
||
| :ivar byte: ByteOperations operations | ||
| :vartype byte: bodybytewithpackagename.aio.operations_async.ByteOperations | ||
| :param str base_url: Service URL | ||
| :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. | ||
| """ | ||
|
|
||
| def __init__( | ||
| self, | ||
| base_url: Optional[str] = None, | ||
| **kwargs: Any | ||
| ) -> None: | ||
| if not base_url: | ||
| base_url = 'http://localhost:3000' | ||
| self._config = ClassNameConfiguration(**kwargs) | ||
| self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) | ||
|
|
||
| client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} | ||
| self._serialize = Serializer(client_models) | ||
| self._deserialize = Deserializer(client_models) | ||
|
|
||
| self.byte = ByteOperations( | ||
| self._client, self._config, self._serialize, self._deserialize) | ||
|
|
||
| async def close(self) -> None: | ||
| await self._client.close() | ||
|
|
||
| async def __aenter__(self) -> "ClassName": | ||
| await self._client.__aenter__() | ||
| return self | ||
|
|
||
| async def __aexit__(self, *exc_details) -> None: | ||
| await self._client.__aexit__(*exc_details) |
45 changes: 45 additions & 0 deletions
45
...ceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/aio/_configuration_async.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # coding=utf-8 | ||
| # -------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # Code generated by Microsoft (R) AutoRest Code Generator. | ||
| # Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
| # -------------------------------------------------------------------------- | ||
|
|
||
| from typing import Any | ||
|
|
||
| from azure.core.configuration import Configuration | ||
| from azure.core.pipeline import policies | ||
|
|
||
| from .._version import VERSION | ||
|
|
||
|
|
||
| class ClassNameConfiguration(Configuration): | ||
| """Configuration for ClassName. | ||
|
|
||
| Note that all parameters used to create this instance are saved as instance | ||
| attributes. | ||
| """ | ||
|
|
||
| def __init__( | ||
| self, | ||
| **kwargs: Any | ||
| ) -> None: | ||
| super(ClassNameConfiguration, self).__init__(**kwargs) | ||
|
|
||
| kwargs.setdefault('sdk_moniker', 'package-name/{}'.format(VERSION)) | ||
| self._configure(**kwargs) | ||
|
|
||
| def _configure( | ||
| self, | ||
| **kwargs: Any | ||
| ) -> None: | ||
| self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) | ||
| self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) | ||
| self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) | ||
| self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) | ||
| self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) | ||
| self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) | ||
| self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) | ||
| self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) | ||
| self.authentication_policy = kwargs.get('authentication_policy') |
13 changes: 13 additions & 0 deletions
13
...nceTests/BodyByteWithPackageName/bodybytewithpackagename/aio/operations_async/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # coding=utf-8 | ||
| # -------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # Code generated by Microsoft (R) AutoRest Code Generator. | ||
| # Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
| # -------------------------------------------------------------------------- | ||
|
|
||
| from ._byte_operations_async import ByteOperations | ||
|
|
||
| __all__ = [ | ||
| 'ByteOperations', | ||
| ] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.