Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ciscripts/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ def fetch_script(self,
script_path,
domain="raw.githubusercontent.com",
urlpath=_GITHUB_URLPATH):
"""Wrapper for _fetch_script, returns a FetchedModule."""
"""Return a FetchedModule after fetching a script."""
info = self.script_path(script_path)
_fetch_script(info, script_path, domain, urlpath)
return info
Expand Down
2 changes: 1 addition & 1 deletion ciscripts/check/python/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


def style_guide_exclusions(lint_exclude):
"""A tuple of (suppressions, exclusions).
"""Return a tuple of (suppressions, exclusions).

suppressions refers to patterns in source code that shouldn't trigger
any warnings from polysquare-generic-file-linter.
Expand Down
2 changes: 1 addition & 1 deletion ciscripts/parse_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def patched_setuptools():
import setuptools

def setup_hook(*args, **kwargs):
"""Hook the setup function and log its arguments."""
"""Override the setup function and log its arguments."""
del args

setuptools_arguments.update(kwargs)
Expand Down
2 changes: 1 addition & 1 deletion ciscripts/setup/project/configure_ruby.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def ruby_build_strategy(container,


def is_running_ubuntu_wily():
"""True if running on Ubuntu 15.04."""
"""Return true if running on Ubuntu 15.04."""
if os.path.exists("/etc/lsb-release"):
with open("/etc/lsb-release") as release_file:
release_keys = {l.split("=")[0]: l.split("=")[1].strip()
Expand Down
5 changes: 5 additions & 0 deletions ciscripts/setup/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ def run(cont, util, shell, argv=None):
py_util.pip_install(cont,
util,
"polysquare-setuptools-lint>=0.0.50")
py_util.pip_install(cont,
util,
"git+git://github.com/smspillaz/prospector"
"@support-pydocstyle-2.0.0-windows-support"
"#egg=prospector")

with util.Task("""Installing python test runners"""):
_install_test_dependencies(cont,
Expand Down
13 changes: 6 additions & 7 deletions ciscripts/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ def language_version(language):
return _PREFERRED_VERSIONS[language]


def override_preferred_version(language, platform, version):
def override_preferred_version(language, platform_name, version):
"""Override the preferred language version for the given platform."""
_PREFERRED_VERSIONS[language][platform] = version
_PREFERRED_VERSIONS[language][platform_name] = version


PRINT_MESSAGES_TO = None
Expand Down Expand Up @@ -405,8 +405,7 @@ def reader(handle, input_queue):

def long_running_suppressed_output(dot_timeout=10):
"""Print dots in a separate thread until our process is done."""
def strategy(process, outputs):
"""Partially applied strategy to be passed to execute."""
def _strategy(process, outputs):
status = _maybe_use_running_output(process, outputs)
if status is not None:
return status
Expand Down Expand Up @@ -434,7 +433,7 @@ def print_dots(status_queue):

return status

return strategy
return _strategy


@contextmanager
Expand Down Expand Up @@ -544,7 +543,7 @@ def force_remove_tree(directory):


def execute(container, output_strategy, *args, **kwargs):
"""A thin wrapper around subprocess.Popen.
"""Execute a command, buffering its output in the configured manner.

This class encapsulates a single command. The first argument to the
constructor specifies how this command's output should be handled
Expand Down Expand Up @@ -604,7 +603,7 @@ def execute(container, output_strategy, *args, **kwargs):
def which(executable):
"""Full path to executable."""
def is_executable(path):
"""True if path exists and is executable."""
"""Return true if path exists and is executable."""
return (os.path.exists(path) and
not os.path.isdir(path) and
os.access(path, os.F_OK | os.X_OK))
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ setuptools-green<=0.1.0
six==1.10.0
testtools==1.7.1
polysquare-setuptools-lint<=0.1.0
git+git://github.com/smspillaz/[email protected]#egg=prospector
2 changes: 1 addition & 1 deletion test/test_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def write_bootstrap_script_into_container(directory_name):

@contextmanager
def removable_container_dir(directory_name):
"""A contextmanager which deletes a container when the test is complete."""
"""Delete a container when the test is complete."""
current_cwd = os.getcwd()
printer = bootstrap.escaped_printer_with_character("\\")
shell = bootstrap.BashParentEnvironment(printer)
Expand Down
4 changes: 2 additions & 2 deletions test/testutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ def _copytree_ignore_notfound(src, dst):


def copy_scripts_to_directory(target):
"""Utility method to copy CI script to current directory.
"""Copy CI script to current directory.

They will be located at /ciscripts/.
"""
Expand Down Expand Up @@ -467,7 +467,7 @@ def in_parent_context(self, command):

@classmethod
def setup_script(cls):
"""Setup script for this acceptance test fixture."""
"""Fetch setup script for this acceptance test fixture."""
return "setup/cmake/setup.py"

@classmethod
Expand Down