diff options
-rw-r--r-- | .travis.yml | 3 | ||||
-rw-r--r-- | cmd2/cmd2.py | 4 | ||||
-rw-r--r-- | docs/conf.py | 2 | ||||
-rw-r--r-- | docs/requirements.txt | 4 | ||||
-rwxr-xr-x | examples/alias_startup.py | 5 | ||||
-rwxr-xr-x | setup.py | 6 | ||||
-rw-r--r-- | tox.ini | 10 |
7 files changed, 22 insertions, 12 deletions
diff --git a/.travis.yml b/.travis.yml index d6689c58..30fdc8cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,9 @@ matrix: - os: linux python: 3.7-dev env: TOXENV=py37 + - os: linux + python: 3.5 + env: TOXENV=docs # # Warning: Don't try to use code coverage analysis with pypy as it is insanely slow # - os: linux # python: pypy3 diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 7dffa4f8..d34e7161 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -1652,8 +1652,8 @@ class Cmd(cmd.Cmd): If you want a reliable pre parsing hook method, register a postparsing hook, modify the user input, and then reparse it. - :param raw: raw command line input :return: potentially modified raw - command line input + :param raw: raw command line input :return: potentially modified raw command line input + :return: a potentially modified version of the raw input string """ return raw diff --git a/docs/conf.py b/docs/conf.py index 13a2dba2..2c75e14e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -102,7 +102,7 @@ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = [] # -- Options for HTMLHelp output ------------------------------------------ diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index bfd6ee02..00000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -attrs -colorama -pyperclip -wcwidth diff --git a/examples/alias_startup.py b/examples/alias_startup.py index 4a061e87..4ae91661 100755 --- a/examples/alias_startup.py +++ b/examples/alias_startup.py @@ -4,14 +4,15 @@ 1) How to add custom command aliases using the alias command 2) How to load an initialization script at startup """ - +import os import cmd2 class AliasAndStartup(cmd2.Cmd): """ Example cmd2 application where we create commands that just print the arguments they are called with.""" def __init__(self): - super().__init__(startup_script='.cmd2rc') + alias_script = os.path.join(os.path.dirname(__file__), '.cmd2rc') + super().__init__(startup_script=alias_script) if __name__ == '__main__': @@ -73,8 +73,10 @@ EXTRAS_REQUIRE = { # development only dependencies # install with 'pip install -e .[dev]' 'dev': [ - 'pytest', 'pytest-cov', 'tox', 'pylint', 'sphinx', 'sphinx-rtd-theme', - 'sphinx-autobuild', 'invoke', 'twine>=1.11', + # for python 3.5 and earlier we need the third party mock module + "mock ; python_version<'3.6'", + 'pytest', 'codecov', 'pytest-cov', 'pytest-mock', 'tox', 'pylint', + 'sphinx', 'sphinx-rtd-theme', 'sphinx-autobuild', 'invoke', 'twine>=1.11', ] } @@ -1,5 +1,5 @@ [tox] -envlist = py34,py35,py36,py37,py35-win,py36-win,py37-win +envlist = docs,py34,py35,py36,py37,py35-win,py36-win,py37-win [pytest] testpaths = tests @@ -9,6 +9,14 @@ passenv = CI TRAVIS TRAVIS_* APPVEYOR* setenv = PYTHONPATH={toxinidir} +[testenv:docs] +basepython = python3.5 +deps = + sphinx + sphinx-rtd-theme +changedir = docs +commands = sphinx-build -a -W -T -b html -d {envtmpdir}/doctrees . {envtmpdir}/html + [testenv:py34] deps = codecov |