diff --git a/sdk/core/azure-core/MANIFEST.in b/sdk/core/azure-core/MANIFEST.in index 1ca2a11167f7..0dbb8925e19d 100644 --- a/sdk/core/azure-core/MANIFEST.in +++ b/sdk/core/azure-core/MANIFEST.in @@ -1,5 +1,5 @@ recursive-include tests *.py *.yaml include *.md include azure/__init__.py -recursive-include examples *.py +recursive-include samples *.py diff --git a/sdk/core/azure-core/azure/core/_match_conditions.py b/sdk/core/azure-core/azure/core/_match_conditions.py index e8204d3d0392..22fbc5f8653c 100644 --- a/sdk/core/azure-core/azure/core/_match_conditions.py +++ b/sdk/core/azure-core/azure/core/_match_conditions.py @@ -27,6 +27,7 @@ from enum import Enum class MatchConditions(Enum): + """An enum to describe match conditions. """ Unconditionally = 1 IfNotModified = 2 IfModified = 3 diff --git a/sdk/core/azure-core/azure/core/_pipeline_client.py b/sdk/core/azure-core/azure/core/_pipeline_client.py index ee5341f143e1..d337ad5792ee 100644 --- a/sdk/core/azure-core/azure/core/_pipeline_client.py +++ b/sdk/core/azure-core/azure/core/_pipeline_client.py @@ -68,7 +68,7 @@ class PipelineClient(PipelineClientBase): .. admonition:: Example: - .. literalinclude:: ../examples/test_example_sync.py + .. literalinclude:: ../samples/test_example_sync.py :start-after: [START build_pipeline_client] :end-before: [END build_pipeline_client] :language: python diff --git a/sdk/core/azure-core/azure/core/_pipeline_client_async.py b/sdk/core/azure-core/azure/core/_pipeline_client_async.py index f4b90cff6bd5..62f64e088063 100644 --- a/sdk/core/azure-core/azure/core/_pipeline_client_async.py +++ b/sdk/core/azure-core/azure/core/_pipeline_client_async.py @@ -67,7 +67,7 @@ class AsyncPipelineClient(PipelineClientBase): .. admonition:: Example: - .. literalinclude:: ../examples/test_example_async.py + .. literalinclude:: ../samples/test_example_async.py :start-after: [START build_async_pipeline_client] :end-before: [END build_async_pipeline_client] :language: python diff --git a/sdk/core/azure-core/azure/core/configuration.py b/sdk/core/azure-core/azure/core/configuration.py index c0bfc0860adf..0a0e7bf0d66b 100644 --- a/sdk/core/azure-core/azure/core/configuration.py +++ b/sdk/core/azure-core/azure/core/configuration.py @@ -48,7 +48,7 @@ class Configuration(object): .. admonition:: Example: - .. literalinclude:: ../examples/test_example_config.py + .. literalinclude:: ../samples/test_example_config.py :start-after: [START configuration] :end-before: [END configuration] :language: python @@ -99,7 +99,7 @@ class ConnectionConfiguration(object): .. admonition:: Example: - .. literalinclude:: ../examples/test_example_config.py + .. literalinclude:: ../samples/test_example_config.py :start-after: [START connection_configuration] :end-before: [END connection_configuration] :language: python diff --git a/sdk/core/azure-core/azure/core/pipeline/_base.py b/sdk/core/azure-core/azure/core/pipeline/_base.py index e147679e192e..854dbf24c199 100644 --- a/sdk/core/azure-core/azure/core/pipeline/_base.py +++ b/sdk/core/azure-core/azure/core/pipeline/_base.py @@ -125,7 +125,7 @@ class Pipeline(AbstractContextManager, Generic[HTTPRequestType, HTTPResponseType .. admonition:: Example: - .. literalinclude:: ../examples/test_example_sync.py + .. literalinclude:: ../samples/test_example_sync.py :start-after: [START build_pipeline] :end-before: [END build_pipeline] :language: python diff --git a/sdk/core/azure-core/azure/core/pipeline/_base_async.py b/sdk/core/azure-core/azure/core/pipeline/_base_async.py index 45871aaaed68..64b6e7608083 100644 --- a/sdk/core/azure-core/azure/core/pipeline/_base_async.py +++ b/sdk/core/azure-core/azure/core/pipeline/_base_async.py @@ -139,7 +139,7 @@ class AsyncPipeline( .. admonition:: Example: - .. literalinclude:: ../examples/test_example_async.py + .. literalinclude:: ../samples/test_example_async.py :start-after: [START build_async_pipeline] :end-before: [END build_async_pipeline] :language: python diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/_base.py b/sdk/core/azure-core/azure/core/pipeline/policies/_base.py index 360439456174..ee5537f5403b 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/_base.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/_base.py @@ -125,7 +125,7 @@ def on_exception(self, request): # pylint: disable=unused-argument .. admonition:: Example: - .. literalinclude:: ../examples/test_example_sansio.py + .. literalinclude:: ../samples/test_example_sansio.py :start-after: [START on_exception] :end-before: [END on_exception] :language: python diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/_redirect.py b/sdk/core/azure-core/azure/core/pipeline/policies/_redirect.py index 6485f638f420..862b60183cd2 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/_redirect.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/_redirect.py @@ -52,7 +52,7 @@ class RedirectPolicy(HTTPPolicy): .. admonition:: Example: - .. literalinclude:: ../examples/test_example_sync.py + .. literalinclude:: ../samples/test_example_sync.py :start-after: [START redirect_policy] :end-before: [END redirect_policy] :language: python diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/_redirect_async.py b/sdk/core/azure-core/azure/core/pipeline/policies/_redirect_async.py index 5ed6d2b981c9..23751f237714 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/_redirect_async.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/_redirect_async.py @@ -40,7 +40,7 @@ class AsyncRedirectPolicy(RedirectPolicy, AsyncHTTPPolicy): # type: ignore .. admonition:: Example: - .. literalinclude:: ../examples/test_example_async.py + .. literalinclude:: ../samples/test_example_async.py :start-after: [START async_redirect_policy] :end-before: [END async_redirect_policy] :language: python diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/_retry.py b/sdk/core/azure-core/azure/core/pipeline/policies/_retry.py index 1fd35d6213c3..7e073f61f1ae 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/_retry.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/_retry.py @@ -74,7 +74,7 @@ class RetryPolicy(HTTPPolicy): .. admonition:: Example: - .. literalinclude:: ../examples/test_example_sync.py + .. literalinclude:: ../samples/test_example_sync.py :start-after: [START retry_policy] :end-before: [END retry_policy] :language: python diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/_retry_async.py b/sdk/core/azure-core/azure/core/pipeline/policies/_retry_async.py index 2eb2dcfb0cba..e5d3a7d708c0 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/_retry_async.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/_retry_async.py @@ -67,7 +67,7 @@ class AsyncRetryPolicy(RetryPolicy, AsyncHTTPPolicy): # type: ignore .. admonition:: Example: - .. literalinclude:: ../examples/test_example_async.py + .. literalinclude:: ../samples/test_example_async.py :start-after: [START async_retry_policy] :end-before: [END async_retry_policy] :language: python diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/_universal.py b/sdk/core/azure-core/azure/core/pipeline/policies/_universal.py index 3df461c0feac..7827117b0779 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/_universal.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/_universal.py @@ -66,7 +66,7 @@ class HeadersPolicy(SansIOHTTPPolicy): .. admonition:: Example: - .. literalinclude:: ../examples/test_example_sansio.py + .. literalinclude:: ../samples/test_example_sansio.py :start-after: [START headers_policy] :end-before: [END headers_policy] :language: python @@ -114,7 +114,7 @@ class UserAgentPolicy(SansIOHTTPPolicy): .. admonition:: Example: - .. literalinclude:: ../examples/test_example_sansio.py + .. literalinclude:: ../samples/test_example_sansio.py :start-after: [START user_agent_policy] :end-before: [END user_agent_policy] :language: python @@ -185,7 +185,7 @@ class NetworkTraceLoggingPolicy(SansIOHTTPPolicy): .. admonition:: Example: - .. literalinclude:: ../examples/test_example_sansio.py + .. literalinclude:: ../samples/test_example_sansio.py :start-after: [START network_trace_logging_policy] :end-before: [END network_trace_logging_policy] :language: python @@ -410,7 +410,7 @@ class ProxyPolicy(SansIOHTTPPolicy): .. admonition:: Example: - .. literalinclude:: ../examples/test_example_sansio.py + .. literalinclude:: ../samples/test_example_sansio.py :start-after: [START proxy_policy] :end-before: [END proxy_policy] :language: python diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/_aiohttp.py b/sdk/core/azure-core/azure/core/pipeline/transport/_aiohttp.py index 1fa048f07e6e..d1cd8e4eed90 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/_aiohttp.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/_aiohttp.py @@ -62,7 +62,7 @@ class AioHttpTransport(AsyncHttpTransport): .. admonition:: Example: - .. literalinclude:: ../examples/test_example_async.py + .. literalinclude:: ../samples/test_example_async.py :start-after: [START aiohttp] :end-before: [END aiohttp] :language: python diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/_requests_asyncio.py b/sdk/core/azure-core/azure/core/pipeline/transport/_requests_asyncio.py index dbd5e3e85d19..ed0ca39fe73e 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/_requests_asyncio.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/_requests_asyncio.py @@ -66,7 +66,7 @@ class AsyncioRequestsTransport(RequestsTransport, AsyncHttpTransport): # type: .. admonition:: Example: - .. literalinclude:: ../examples/test_example_async.py + .. literalinclude:: ../samples/test_example_async.py :start-after: [START asyncio] :end-before: [END asyncio] :language: python diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/_requests_basic.py b/sdk/core/azure-core/azure/core/pipeline/transport/_requests_basic.py index 79591cea06b9..2b8252c763b0 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/_requests_basic.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/_requests_basic.py @@ -159,7 +159,7 @@ class RequestsTransport(HttpTransport): .. admonition:: Example: - .. literalinclude:: ../examples/test_example_sync.py + .. literalinclude:: ../samples/test_example_sync.py :start-after: [START requests] :end-before: [END requests] :language: python diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/_requests_trio.py b/sdk/core/azure-core/azure/core/pipeline/transport/_requests_trio.py index f4e6dfdd6369..b3462f8325db 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/_requests_trio.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/_requests_trio.py @@ -137,7 +137,7 @@ class TrioRequestsTransport(RequestsTransport, AsyncHttpTransport): # type: ign .. admonition:: Example: - .. literalinclude:: ../examples/test_example_async.py + .. literalinclude:: ../samples/test_example_async.py :start-after: [START trio] :end-before: [END trio] :language: python diff --git a/sdk/core/azure-core/examples/conftest.py b/sdk/core/azure-core/samples/conftest.py similarity index 100% rename from sdk/core/azure-core/examples/conftest.py rename to sdk/core/azure-core/samples/conftest.py diff --git a/sdk/core/azure-core/examples/test_example_async.py b/sdk/core/azure-core/samples/test_example_async.py similarity index 100% rename from sdk/core/azure-core/examples/test_example_async.py rename to sdk/core/azure-core/samples/test_example_async.py diff --git a/sdk/core/azure-core/examples/test_example_config.py b/sdk/core/azure-core/samples/test_example_config.py similarity index 100% rename from sdk/core/azure-core/examples/test_example_config.py rename to sdk/core/azure-core/samples/test_example_config.py diff --git a/sdk/core/azure-core/examples/test_example_sansio.py b/sdk/core/azure-core/samples/test_example_sansio.py similarity index 100% rename from sdk/core/azure-core/examples/test_example_sansio.py rename to sdk/core/azure-core/samples/test_example_sansio.py diff --git a/sdk/core/azure-core/examples/test_example_sync.py b/sdk/core/azure-core/samples/test_example_sync.py similarity index 100% rename from sdk/core/azure-core/examples/test_example_sync.py rename to sdk/core/azure-core/samples/test_example_sync.py