azure-sdk-for-python icon indicating copy to clipboard operation
azure-sdk-for-python copied to clipboard

use of pep-8 in python documentation

Open packet-sniffer opened this issue 3 years ago • 7 comments

[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.

packet-sniffer avatar Jun 21 '22 18:06 packet-sniffer

Thanks @packet-sniffer, just for clarity are you talking about the examples in documentation or the client library itself?

kristapratico avatar Jun 21 '22 19:06 kristapratico

Thank you for your feedback. This has been routed to the support team for assistance.

ghost avatar Jun 21 '22 19:06 ghost

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 avatar Jun 21 '22 19:06 packet-sniffer

@packet-sniffer Is there a particular example that you are referring to here or perhaps that you've come across such examples in general?

PramodValavala-MSFT avatar Jun 24 '22 04:06 PramodValavala-MSFT

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!

ghost avatar Jul 01 '22 08:07 ghost

@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 avatar Jul 01 '22 17:07 packet-sniffer

@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.

PramodValavala-MSFT avatar Aug 08 '22 18:08 PramodValavala-MSFT

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!

ghost avatar Aug 15 '22 20:08 ghost