Update license header comments block for PEP8 (#1333)

* Remove UTF-8 BOM

* Update comment blocks for license headers
This commit is contained in:
Troy Dai 2016-11-15 14:24:07 -08:00 коммит произвёл GitHub
Родитель 2eb6a9ac8c
Коммит 487f0196fc
730 изменённых файлов: 1558 добавлений и 1480 удалений

Просмотреть файл

@ -1,8 +1,8 @@
#! /usr/bin/env python3
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import os
import re

Просмотреть файл

@ -1,6 +1,6 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import pkg_resources
pkg_resources.declare_namespace(__name__)

Просмотреть файл

@ -1,6 +1,6 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import pkg_resources
pkg_resources.declare_namespace(__name__)

Просмотреть файл

@ -1,6 +1,6 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import pkg_resources
pkg_resources.declare_namespace(__name__)

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Add command module logic to this package.
from azure.cli.commands import cli_command

Просмотреть файл

@ -1,8 +1,8 @@
#!/usr/bin/env python
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from codecs import open
from setuptools import setup

Просмотреть файл

@ -1,6 +1,6 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import pkg_resources
pkg_resources.declare_namespace(__name__)

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import argparse
import json

Просмотреть файл

@ -1,6 +1,6 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import pkg_resources
pkg_resources.declare_namespace(__name__)

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import copy
from docutils import nodes
from sphinx import addnodes

Просмотреть файл

@ -1,8 +1,8 @@
#!/usr/bin/env python3
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# -*- coding: utf-8 -*-
#
# az documentation build configuration file, created by

28
scripts/_common.py Normal file
Просмотреть файл

@ -0,0 +1,28 @@
#!/usr/bin/env python
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# common utilities for scripts
from __future__ import print_function
def get_repo_root():
"""
Returns the root path to this repository. The root is where .git folder is.
"""
import os.path
here = os.path.dirname(os.path.realpath(__file__))
while not os.path.exists(os.path.join(here, '.git')):
here = os.path.dirname(here)
return here
if __name__ == '__main__':
print(get_repo_root())

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from __future__ import print_function
import os

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from __future__ import print_function
import os

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from __future__ import print_function

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
## Install the command modules using pip ##
from __future__ import print_function

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
## Install the command modules using pip ##
from __future__ import print_function

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
## Run the tests for each command module ##

Просмотреть файл

@ -1,9 +1,9 @@
#!/usr/bin/env python
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
#
# This script will install the CLI into a directory and create an executable

Просмотреть файл

@ -1,9 +1,9 @@
#!/usr/bin/env python
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
#
# This script will set up tab completion for the Azure CLI.

Просмотреть файл

@ -1,9 +1,9 @@
#!/usr/bin/env python
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from __future__ import print_function

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from __future__ import print_function
@ -131,4 +131,4 @@ PRIMITIVES = (str, int, bool, float)
IGNORE_ARGS = ['help', 'help_file', 'base_type']
APPLICATION.register(Application.COMMAND_PARSER_LOADED, _dump_command_table)
APPLICATION.execute([])
APPLICATION.execute([])

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import argparse
import json

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import argparse
import json
@ -50,4 +50,4 @@ else:
heading = '=== COMMANDS IN {} PACKAGE(S) WITH {} PARAMETERS ==='.format(
cmd_set_names or 'ANY', param_names or 'ANY')
print('\n{}\n'.format(heading))
print('\n'.join(results))
print('\n'.join(results))

Просмотреть файл

@ -1,19 +1,24 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import os
ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..'))
PY_LICENSE_HEADER = \
"""#---------------------------------------------------------------------------------------------
"""# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
"""
env_folders = [
os.path.join(ROOT_DIR, 'env'),
os.path.join(ROOT_DIR, 'package-verify-env')
]
def contains_header(text):
return PY_LICENSE_HEADER in text
@ -23,6 +28,10 @@ def has_shebang(text):
def get_files_without_header():
files_without_header = []
for current_dir, _, files in os.walk(ROOT_DIR):
# skip folders generated by virtual env
if any(d for d in env_folders if d in current_dir):
continue
for a_file in files:
if a_file.endswith('.py'):
cur_file_path = os.path.join(current_dir, a_file)

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Add license header to every *.py file in the repo. Can be run multiple times without duplicating the headers.

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Verify that all *.py files have a license header in the file.

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
## Install the command modules using pip ##
from __future__ import print_function

41
scripts/remove_bom.py Normal file
Просмотреть файл

@ -0,0 +1,41 @@
#!/usr/bin/env python
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# Remove the UTF-8 BOM from all python files
from __future__ import print_function
import os
import codecs
from _common import get_repo_root
def remove_bom(file_path):
file_size = os.path.getsize(file_path)
if file_size < 32:
return False
content = None
with open(file_path, 'rb') as f:
first_32 = f.read(32)
if not first_32.startswith(codecs.BOM_UTF8):
return
content = bytearray(first_32 + f.read(file_size))
with open(file_path, 'wb') as f:
f.write(content[len(codecs.BOM_UTF8):])
if __name__ == '__main__':
repo_root = get_repo_root()
for root, dirs, files in os.walk(repo_root):
if root[len(repo_root):len(repo_root) + 5] == '/.git':
continue
for f in (os.path.join(root, f) for f in files if f[-3:] == '.py'):
remove_bom(f)

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from __future__ import print_function

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
"""
Generate a command module using the SDK.
@ -34,7 +34,7 @@ i.e. 'az {command_module_name}'
SETUP_TEMPLATE = """#!/usr/bin/env python
#-------------------------------------------------------------------------
# ------------------------------------------------------------------------
# Copyright (c) Microsoft. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@ -47,7 +47,7 @@ SETUP_TEMPLATE = """#!/usr/bin/env python
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#--------------------------------------------------------------------------
# -------------------------------------------------------------------------
from codecs import open
from setuptools import setup

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
"""
Create the generated.py file for a command module.

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import configparser
import os

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from __future__ import print_function
@ -20,10 +20,10 @@ from _common import get_name_from_path, get_config, to_snake_case
def _autorest_client_name(name):
return '{}creationclient'.format(str.lower(name))
HEADER = """#---------------------------------------------------------------------------------------------
HEADER = """# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
#pylint: skip-file
"""
@ -120,4 +120,4 @@ Your template is almost ready to be integrated into the CLI. You need to do the
)
if __name__ == '__main__':
generate_smart_create(*sys.argv[1:])
generate_smart_create(*sys.argv[1:])

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from __future__ import print_function
@ -566,4 +566,4 @@ def convert_template_to_swagger(*args):
return dest
if __name__ == '__main__':
convert_template_to_swagger(*sys.argv[1:])
convert_template_to_swagger(*sys.argv[1:])

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from __future__ import print_function
@ -67,4 +67,4 @@ def upload_template_files(*args):
if __name__ == '__main__':
upload_template_files(*sys.argv[1:])
upload_template_files(*sys.argv[1:])

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import os
import sys

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from _common import (create_vm,
install_cli_interactive,

Просмотреть файл

@ -1,6 +1,6 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import pkg_resources
pkg_resources.declare_namespace(__name__)

Просмотреть файл

@ -1,6 +1,6 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import pkg_resources
pkg_resources.declare_namespace(__name__)

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import pkg_resources
pkg_resources.declare_namespace(__name__)

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import os
from six.moves import configparser

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import os
import azure.cli.core._logging as _logging

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from __future__ import print_function
import argparse

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import os
import platform

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from __future__ import print_function, unicode_literals

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from __future__ import print_function
import collections

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import json
import os

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from __future__ import print_function
import re

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import requests
import adal

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from collections import defaultdict
import sys

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import os
from six.moves import configparser

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from __future__ import print_function
import json

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import inspect
import re

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import argparse
import re

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from azure.cli.core import __version__ as core_version
from azure.cli.core._profile import Profile, CLOUD

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# pylint: disable=line-too-long
import argparse

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from __future__ import print_function
import argparse

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import argparse
import time

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import os
from six.moves import configparser

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from azure.cli.core.extensions.query import register as register_query
from azure.cli.core.extensions.transform import register as register_transform

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
def register(event_dispatcher):
def _enable_experimental_handlers(_, event_data):

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import collections

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import re

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# modules should add entries to helps in the form: "group command": "YAML help"

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import argparse

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from __future__ import print_function
import getpass
import datetime

Просмотреть файл

@ -1,4 +1,4 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from __future__ import print_function

Просмотреть файл

@ -1,4 +1,4 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import unittest
from six import StringIO

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import unittest

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import tempfile
import unittest

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import sys
import logging

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import os
import unittest

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import os
import logging

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import os

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import unittest

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
#pylint:disable=unused-import,invalid-sequence-index,unsubscriptable-object,line-too-long,too-few-public-methods

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from __future__ import print_function
import sys

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import unittest
import azure.cli.core._logging as _logging

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from __future__ import print_function
# pylint: disable=protected-access, bad-continuation, too-many-public-methods, trailing-whitespace

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import unittest
from six import StringIO

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# pylint: disable=protected-access, unsubscriptable-object
import json

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# pylint: disable=line-too-long
import unittest

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# pylint: disable=line-too-long
from collections import namedtuple

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import argparse
import unittest

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# pylint: disable=line-too-long
import os

Просмотреть файл

@ -1,9 +1,9 @@
#!/usr/bin/env python
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from __future__ import print_function
from codecs import open

Просмотреть файл

@ -1,6 +1,6 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import pkg_resources
pkg_resources.declare_namespace(__name__)

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
'''The Azure Command-line tool.
This tools provides a command-line interface to Azure's management and storage

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import sys
import os

Просмотреть файл

@ -1,6 +1,6 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import pkg_resources
pkg_resources.declare_namespace(__name__)

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import os
import sys

Просмотреть файл

@ -1,4 +1,4 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------

Просмотреть файл

@ -1,9 +1,9 @@
#!/usr/bin/env python
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
from __future__ import print_function
from codecs import open

Просмотреть файл

@ -1,6 +1,6 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import pkg_resources
pkg_resources.declare_namespace(__name__)

Просмотреть файл

@ -1,6 +1,6 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import pkg_resources
pkg_resources.declare_namespace(__name__)

Просмотреть файл

@ -1,6 +1,6 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import pkg_resources
pkg_resources.declare_namespace(__name__)

Просмотреть файл

@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import azure.cli.command_modules.acr._help #pylint: disable=unused-import

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше