From e03e4845cd470bd2150bc778a2737c3109d7a5ba Mon Sep 17 00:00:00 2001 From: Melissa Kersh Date: Mon, 25 Jul 2016 13:55:28 -0700 Subject: [PATCH] added in @dimoschi's fix and fixed white space issues --- tox.ini | 4 ++-- txclib/utils.py | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 327c72b1..e04a3ea8 100644 --- a/tox.ini +++ b/tox.ini @@ -10,8 +10,8 @@ whitelist_externals = source bash install_command = pip install -U {opts} {packages} setenv = TOX_ENV_NAME={envname} -passenv = TOX_* TRANSIFEX_USER TRANSIFEX_PASSWORD CI CI_* CIRCLECI CIRCLE* APPVEYOR* CODECOV_TOKEN +passenv = TOX_* TRANSIFEX_USER TRANSIFEX_PASSWORD CI CI_* CIRCLECI CIRCLE* APPVEYOR* commands = python -V coverage run --append setup.py test bash ./contrib/test_build.sh - codecov -e TOX_ENV_NAME -t {env:CODECOV_TOKEN:} + codecov -e TOX_ENV_NAME diff --git a/txclib/utils.py b/txclib/utils.py index 491a83da..59bf5d4c 100755 --- a/txclib/utils.py +++ b/txclib/utils.py @@ -26,6 +26,7 @@ def get_base_dir(): """PyInstaller Run-time Operation. + http://pythonhosted.org/PyInstaller/#run-time-operation """ if getattr(sys, 'frozen', False): @@ -39,6 +40,7 @@ def get_base_dir(): def find_dot_tx(path=os.path.curdir, previous=None): """Return the path where .tx folder is found. + The 'path' should be a DIRECTORY. This process is functioning recursively from the current directory to each one of the ancestors dirs. @@ -181,6 +183,7 @@ def make_request(method, host, url, username, password, fields=None, def get_details(api_call, username, password, *args, **kwargs): """ Get the tx project info through the API. + This function can also be used to check the existence of a project. """ url = API_URLS[api_call] % kwargs @@ -197,6 +200,7 @@ def get_details(api_call, username, password, *args, **kwargs): def valid_slug(slug): """ Check if a slug contains only valid characters. + Valid chars include [-_\w] """ try: @@ -254,6 +258,7 @@ def mkdir_p(path): def confirm(prompt='Continue?', default=True): """ Prompt the user for a Yes/No answer. + Args: prompt: The text displayed to the user ([Y/n] will be appended) default: If the default value will be yes or no @@ -289,6 +294,7 @@ def color_text(text, color_name, bold=False): This command can be used to colorify command line output. If the shell doesn't support this or the --disable-colors options has been set, it just returns the plain text. + Usage: print "%s" % color_text("This text is red", "RED") """ @@ -302,6 +308,7 @@ def color_text(text, color_name, bold=False): def files_in_project(curpath): """ Iterate over the files in the project. + Return each file under ``curpath`` with its absolute name. """ visited = set()