-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Change the automation code 1. Install automation code as development package 2. Add PEP8 scripts to fix PEP8 automatically * Fix typo in automation.style.pep8
- Loading branch information
Showing
7 changed files
with
83 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
|
||
def fix_p2p8(directory): | ||
import autopep8 | ||
import multiprocessing | ||
|
||
autopep8.fix_multiple_files([directory], | ||
options=autopep8._get_options( | ||
{ | ||
'jobs': multiprocessing.cpu_count(), | ||
'verbose': True, | ||
'recursive': True, | ||
'in_place': True, | ||
'max_line_length': 100 | ||
}, False)) | ||
|
||
|
||
if __name__ == '__main__': | ||
import sys | ||
|
||
if len(sys.argv) < 2: | ||
print('usage: python automation.style.pep8 <directory>') | ||
sys.exit(1) | ||
|
||
fix_p2p8(sys.argv[1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/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 setuptools import setup | ||
|
||
VERSION = "0.1.0" | ||
|
||
CLASSIFIERS = [ | ||
'Development Status :: 4 - Beta', | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: System Administrators', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 2', | ||
'Programming Language :: Python :: 2.7', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.4', | ||
'Programming Language :: Python :: 3.5', | ||
'License :: OSI Approved :: MIT License', | ||
] | ||
|
||
DEPENDENCIES = [ | ||
'autopep8==1.2.4', | ||
'coverage==4.2', | ||
'pycodestyle==2.2.0' | ||
] | ||
|
||
setup( | ||
name='automation', | ||
version=VERSION, | ||
description='Microsoft Azure Command-Line Tools - Automation Utility', | ||
long_description='', | ||
license='MIT', | ||
author='Microsoft Corporation', | ||
author_email='azpycli@microsoft.com', | ||
url='https://github.com/Azure/azure-cli', | ||
namespace_packages=[ | ||
], | ||
packages=[ | ||
'automation', | ||
'automation.style', | ||
'automation.tests', | ||
'automation.setup', | ||
'automation.coverage' | ||
], | ||
install_requires=DEPENDENCIES | ||
) |