azure-sdk-for-python
azure-sdk-for-python copied to clipboard
use of pep-8 in python documentation
[Hello-- I am seeing that variables names are not written according to pep-8 standards, and then the users who follow the azure doc are also following similar format, hence learning the wrong way. ref: https://peps.python.org/pep-0008/#function-and-variable-names]
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: b58f3530-18bd-6656-c9e6-b602147cbab0
- Version Independent ID: 25b6e1bc-ab9f-2e46-d151-9090500cb68f
- Content: Azure Network libraries for python
- Content Source: docs-ref-services/latest/network.md
- Service: multiple
- Product: azure
- Technology: azure
- GitHub Login: @sptramer
- Microsoft Alias: sttramer
Thanks @packet-sniffer, just for clarity are you talking about the examples in documentation or the client library itself?
Thank you for your feedback. This has been routed to the support team for assistance.
Hi @kristapratico -- Thank you for your response, this is in regards to the example, the reason I bring it up is I have some team mates starting to learn python and they are following the naming standards from these documentation, which is not as per the standard.
@packet-sniffer Is there a particular example that you are referring to here or perhaps that you've come across such examples in general?
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!
@packet-sniffer Is there a particular example that you are referring to here or perhaps that you've come across such examples in general?
Hi Pramod, thanks for your response; sure here is the code: `from azure.mgmt.network import NetworkManagementClient
GROUP_NAME = 'resource-group' VNET_NAME = 'your-vnet-identifier' LOCATION = 'region' SUBNET_NAME = 'your-subnet-identifier'
network_client = NetworkManagementClient(credentials, 'your-subscription-id')
async_vnet_creation = network_client.virtual_networks.create_or_update( GROUP_NAME, VNET_NAME, { 'location': LOCATION, 'address_space': { 'address_prefixes': ['10.0.0.0/16'] } } ) async_vnet_creation.wait()
Create Subnet
async_subnet_creation = network_client.subnets.create_or_update( GROUP_NAME, VNET_NAME, SUBNET_NAME, {'address_prefix': '10.0.0.0/24'} ) subnet_info = async_subnet_creation.result()` from https://docs.microsoft.com/en-us/python/api/overview/azure/network?view=azure-python
as you can see the variable name don't conform to pep-8 standard.
@packet-sniffer Apologies for not getting back on this sooner! If you are referring to the all cap variables names, they are constants here and do conform to pep-8 as linked.
Do let me know if you are referring to something else here.
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!