-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes line endings and adds some INFO and TODO comments
- Loading branch information
Showing
13 changed files
with
353 additions
and
343 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
# Set the default behavior (used when a rule below doesn't match) | ||
* text=auto | ||
|
||
*.sln -text | ||
*.ico -text | ||
*.bmp -text | ||
*.png -text | ||
*.snk -text | ||
*.mht -text | ||
*.pickle -text | ||
|
||
# Some Windows-specific files should always be CRLF | ||
*.bat eol=crlf | ||
# Set the default behavior (used when a rule below doesn't match) | ||
* text=auto | ||
|
||
*.sln -text | ||
*.ico -text | ||
*.bmp -text | ||
*.png -text | ||
*.snk -text | ||
*.mht -text | ||
*.pickle -text | ||
|
||
# Some Windows-specific files should always be CRLF | ||
*.bat eol=crlf |
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 |
---|---|---|
@@ -1,61 +1,61 @@ | ||
# Python cache | ||
__pycache__/ | ||
*.pyc | ||
|
||
# Virtual environment | ||
env/ | ||
|
||
# PTVS analysis | ||
.ptvs/ | ||
|
||
# Build results | ||
bin/ | ||
obj/ | ||
dist/ | ||
MANIFEST | ||
|
||
# Result of running python setup.py install/pip install -e | ||
RECORD.txt | ||
build/ | ||
*.egg-info/ | ||
|
||
# Test results | ||
TestResults/ | ||
|
||
# Credentials | ||
credentials_real.json | ||
testsettings_local.json | ||
servicebus_settings_real.py | ||
storage_settings_real.py | ||
legacy_mgmt_settings_real.py | ||
mgmt_settings_real.py | ||
app_creds_real.py | ||
|
||
# User-specific files | ||
*.suo | ||
*.user | ||
*.sln.docstates | ||
.vs/ | ||
|
||
# Windows image file caches | ||
Thumbs.db | ||
ehthumbs.db | ||
|
||
# Folder config file | ||
Desktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
# Mac desktop service store files | ||
.DS_Store | ||
|
||
.idea | ||
src/build | ||
*.iml | ||
/doc/_build | ||
/.vs/config/applicationhost.config | ||
|
||
# Azure deployment credentials | ||
*.pubxml | ||
|
||
# Python cache | ||
__pycache__/ | ||
*.pyc | ||
|
||
# Virtual environment | ||
env/ | ||
|
||
# PTVS analysis | ||
.ptvs/ | ||
|
||
# Build results | ||
bin/ | ||
obj/ | ||
dist/ | ||
MANIFEST | ||
|
||
# Result of running python setup.py install/pip install -e | ||
RECORD.txt | ||
build/ | ||
*.egg-info/ | ||
|
||
# Test results | ||
TestResults/ | ||
|
||
# Credentials | ||
credentials_real.json | ||
testsettings_local.json | ||
servicebus_settings_real.py | ||
storage_settings_real.py | ||
legacy_mgmt_settings_real.py | ||
mgmt_settings_real.py | ||
app_creds_real.py | ||
|
||
# User-specific files | ||
*.suo | ||
*.user | ||
*.sln.docstates | ||
.vs/ | ||
|
||
# Windows image file caches | ||
Thumbs.db | ||
ehthumbs.db | ||
|
||
# Folder config file | ||
Desktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
# Mac desktop service store files | ||
.DS_Store | ||
|
||
.idea | ||
src/build | ||
*.iml | ||
/doc/_build | ||
/.vs/config/applicationhost.config | ||
|
||
# Azure deployment credentials | ||
*.pubxml | ||
|
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 |
---|---|---|
@@ -1 +1 @@ | ||
__import__('pkg_resources').declare_namespace(__name__) | ||
__import__('pkg_resources').declare_namespace(__name__) |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import sys | ||
|
||
import azure.cli.main | ||
sys.exit(azure.cli.main.main(sys.argv[1:])) | ||
import sys | ||
|
||
import azure.cli.main | ||
sys.exit(azure.cli.main.main(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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import argparse | ||
|
||
class ArgumentParser(argparse.ArgumentParser): | ||
# TODO: Improve help appearance | ||
pass | ||
import argparse | ||
|
||
class ArgumentParser(argparse.ArgumentParser): | ||
# TODO: Improve help appearance | ||
pass | ||
|
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 |
---|---|---|
@@ -1,15 +1,20 @@ | ||
import os | ||
|
||
try: | ||
import configparser | ||
except ImportError: | ||
import ConfigParser as configparser | ||
|
||
_loaded_config = None | ||
def get_config(): | ||
global _loaded_config | ||
if _loaded_config is None: | ||
cfg = configparser.RawConfigParser() | ||
cfg.read(os.path.expanduser('~/azure.ini')) | ||
_loaded_config = cfg | ||
return _loaded_config | ||
import os | ||
|
||
try: | ||
import configparser | ||
except ImportError: | ||
import ConfigParser as configparser | ||
|
||
_loaded_config = None | ||
def get_config(): | ||
'''Loads the user's azure.ini file and returns its contents. | ||
The file is only read once and the results cached. Modifications to | ||
the file during execution will not be seen. | ||
''' | ||
global _loaded_config | ||
if _loaded_config is None: | ||
cfg = configparser.RawConfigParser() | ||
cfg.read(os.path.expanduser('~/azure.ini')) | ||
_loaded_config = cfg | ||
return _loaded_config |
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 |
---|---|---|
@@ -1,26 +1,26 @@ | ||
import logging | ||
|
||
# These arguments will be removed | ||
STRIP_ARGS = frozenset([ | ||
'-v', | ||
'--verbose', | ||
'--debug', | ||
]) | ||
|
||
def configure_logging(argv): | ||
# TODO: Configure logging handler to log messages to .py file | ||
# Thinking here: | ||
# INFO messages as Python code | ||
# DEBUG messages (if -v) as comments | ||
# WARNING/ERROR messages as clearly marked comments | ||
|
||
# Currently we just use the default format | ||
level = logging.WARNING | ||
if '-v' in argv or '--verbose' in argv: | ||
level = logging.INFO | ||
if '--debug' in argv: | ||
level = logging.DEBUG | ||
|
||
logging.basicConfig(level=level) | ||
|
||
import logging | ||
|
||
# These arguments will be removed | ||
STRIP_ARGS = frozenset([ | ||
'-v', | ||
'--verbose', | ||
'--debug', | ||
]) | ||
|
||
def configure_logging(argv): | ||
# TODO: Configure logging handler to log messages to .py file | ||
# Thinking here: | ||
# INFO messages as Python code | ||
# DEBUG messages (if -v) as comments | ||
# WARNING/ERROR messages as clearly marked comments | ||
|
||
# Currently we just use the default format | ||
level = logging.WARNING | ||
if '-v' in argv or '--verbose' in argv: | ||
level = logging.INFO | ||
if '--debug' in argv: | ||
level = logging.DEBUG | ||
|
||
logging.basicConfig(level=level) | ||
|
||
return [a for a in argv if a not in STRIP_ARGS] |
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import logging | ||
import types | ||
|
||
try: | ||
from importlib import import_module | ||
except ImportError: | ||
def import_module(mod): | ||
m = __import__(mod) | ||
for b in mod.split('.'): | ||
m = gettatr(m, b) | ||
return m | ||
import logging | ||
import types | ||
|
||
try: | ||
from importlib import import_module | ||
except ImportError: | ||
def import_module(mod): | ||
m = __import__(mod) | ||
for b in mod.split('.'): | ||
m = gettatr(m, b) | ||
return m |
Oops, something went wrong.