Skip to content

dependency upgrades, pep8 fixes, and python 3.7 support #225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
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
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ matrix:
env: TEST_TYPE=test
- python: 3.6
env: TEST_TYPE=test

- python: 3.7
env: TEST_TYPE=test

sudo: false
install:
- if [[ $TEST_TYPE == 'check' ]]; then pip install -r requirements-dev.txt; fi
Expand Down
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
# py.test --cov awsshell --cov-report term-missing --cov-fail-under 95 tests/
# which will fail if tests are under 95%

prepare:
###### FLAKE8 #####
# Install all requirements for testing and debugging
pip install -U -r requirements-dev.txt
pip install -U -r requirements-test.txt
python scripts/ci/install

check:
###### FLAKE8 #####
# No unused imports, no undefined vars,
Expand Down Expand Up @@ -34,6 +41,9 @@ check:
test:
python scripts/ci/run-tests

integration:
python scripts/ci/run-integ-tests

pylint:
###### PYLINT ######
# Python linter. This will generally not have clean output.
Expand Down
4 changes: 2 additions & 2 deletions awsshell/shellcomplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ def get_completions(self, document, complete_event):
completions = self._completer.autocomplete(text_before_cursor)
prompt_completions = list(self._convert_to_prompt_completions(
completions, text_before_cursor))
if (not prompt_completions and self._completer.last_option and
len(self._completer.cmd_path) == 3):
if (not prompt_completions and self._completer.last_option
and len(self._completer.cmd_path) == 3):
# If we couldn't complete anything from the JSON model
# completer and we're on a cli option (e.g --foo), we
# can ask the server side completer if it knows anything
Expand Down
12 changes: 6 additions & 6 deletions awsshell/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def create_default_layout(app, message='',
replacing the prompt.
"""
assert isinstance(message, text_type)
assert (get_bottom_toolbar_tokens is None or
callable(get_bottom_toolbar_tokens))
assert (get_bottom_toolbar_tokens is None
or callable(get_bottom_toolbar_tokens))
assert get_prompt_tokens is None or callable(get_prompt_tokens)
assert not (message and get_prompt_tokens)

Expand Down Expand Up @@ -166,13 +166,13 @@ def separator():
content=CompletionsMenu(
max_height=16,
scroll_offset=1,
extra_filter=(HasFocus(DEFAULT_BUFFER) &
~display_completions_in_columns))),
extra_filter=(HasFocus(DEFAULT_BUFFER)
& ~display_completions_in_columns))), # noqa E501
Float(xcursor=True,
ycursor=True,
content=MultiColumnCompletionsMenu(
extra_filter=(HasFocus(DEFAULT_BUFFER) &
display_completions_in_columns),
extra_filter=(HasFocus(DEFAULT_BUFFER)
& display_completions_in_columns),
show_meta=Always()))
]
),
Expand Down
6 changes: 3 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
doc8==0.6.0
flake8==2.5.0
doc8==0.8.0
flake8==3.6.0
pep257==0.7.0
pylint==1.7.2
pylint<=2.2.2 # pylint 2.2.2 is not released on Python 2.7.x
-rrequirements-test.txt
10 changes: 5 additions & 5 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pytest==3.0.2
pytest-cov==2.3.1
mock==1.3.0
tox==2.2.1
pytest==4.1.0
pytest-cov==2.6.1
mock==2.0.0
tox==3.6.1
configobj==5.0.6
# Note you need at least pip --version of 6.0 or
# higher to be able to pick on these version specifiers.
unittest2==1.1.0; python_version == '2.6'
unittest2==1.1.0; python_version == '2.7'
4 changes: 2 additions & 2 deletions scripts/ci/install
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ try:
except KeyError:
python_version = '.'.join([str(i) for i in sys.version_info[:2]])

run('pip install -r requirements-test.txt')
run('pip install -U -r requirements-test.txt')
if os.path.isdir('dist') and os.listdir('dist'):
shutil.rmtree('dist')
run('python setup.py bdist_wheel')
wheel_dist = os.listdir('dist')[0]
run('pip install %s' % (os.path.join('dist', wheel_dist)))
run('pip install -U %s' % (os.path.join('dist', wheel_dist)))
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@


requires = [
'awscli>=1.16.10,<2.0.0',
'prompt-toolkit>=1.0.0,<1.1.0',
'boto3>=1.9.0,<2.0.0',
'awscli>=1.16.87,<2.0.0',
'prompt-toolkit>=1.0.15,<2.0.0',
'boto3>=1.9.77,<3.0.0',
'configobj>=5.0.6,<6.0.0',
'Pygments>=2.1.3,<3.0.0',
]
Expand Down Expand Up @@ -55,5 +55,6 @@
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
),
)