Skip to content

Commit c4abbb2

Browse files
committed
Update header verification script
1 parent f1126bb commit c4abbb2

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

azext/batch/_vendor/v4/azext/batch/models/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77

88
# Not ideal syntax - but savaes us having to check and repopulate this
99
# list every time the SDK is regenerated.
10-
from . import *
11-
from azext.batch._vendor.v4.azure.batch.models import *
10+
from ....azure.batch.models import *
1211

1312
try:
1413
from .extended_task_parameter_py3 import ExtendedTaskParameter

batch-cli-extensions/azext_batch/custom.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Copyright (c) Microsoft Corporation. All rights reserved.
33
# Licensed under the MIT License. See License.txt in the project root for license information.
44
# --------------------------------------------------------------------------------------------
5-
import json
65
import multiprocessing
76
from azure.cli.core.util import get_file_json
87
from knack.log import get_logger

scripts/license/_common.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,33 @@
77

88
ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..'))
99

10-
PY_LICENSE_HEADER = \
10+
EXTENSION_SDK_LICENSE_HEADER = \
1111
"""# --------------------------------------------------------------------------------------------
1212
# Copyright (c) Microsoft Corporation. All rights reserved.
1313
# Licensed under the MIT License. See License.txt in the project root for license information.
1414
# --------------------------------------------------------------------------------------------
1515
"""
1616

17+
PYTHON_SDK_LICENSE_HEADER = \
18+
"""# --------------------------------------------------------------------------
19+
# Copyright (c) Microsoft Corporation. All rights reserved.
20+
# Licensed under the MIT License. See License.txt in the project root for
21+
# license information.
22+
#
23+
# Code generated by Microsoft (R) AutoRest Code Generator.
24+
# Changes may cause incorrect behavior and will be lost if the code is
25+
# regenerated.
26+
# --------------------------------------------------------------------------
27+
"""
28+
1729
env_folders = [
1830
os.path.join(ROOT_DIR, 'env'),
1931
os.path.join(ROOT_DIR, 'package-verify-env'),
2032
os.path.join(ROOT_DIR, '.azure')
2133
]
2234

2335
def contains_header(text):
24-
return PY_LICENSE_HEADER in text
36+
return (EXTENSION_SDK_LICENSE_HEADER in text or PYTHON_SDK_LICENSE_HEADER in text)
2537

2638
def has_shebang(text):
2739
return text.startswith('#!')

0 commit comments

Comments
 (0)