Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Closed
23 changes: 8 additions & 15 deletions 23 .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,28 @@ python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
# Workaround for testing Python 3.7:
# https://github.com/travis-ci/travis-ci/issues/9815
matrix:
include:
- python: 3.7
dist: xenial
sudo: yes
- "3.7"
- "3.8"

before_install:
- pip install --upgrade setuptools pip
- pip install --upgrade pylint pytest pytest-pylint pytest-runner

install:
- pip install termcolor
- pip install hypothesis python-Levenshtein
- pip install termcolor hypothesis python-Levenshtein
- if [[ $TRAVIS_PYTHON_VERSION != 3.4 ]]; then pip install pytype; fi
- python setup.py develop

script:
- python -m pytest # Run the tests without IPython.
- pip install ipython
- python -m pytest # Now run the tests with IPython.
- pylint fire --ignore=test_components_py3.py,parser_fuzz_test.py,console
- if [[ $TRAVIS_PYTHON_VERSION != 3.4 ]]; then
pip install pytype;
fi
# Run type-checking, excluding files that define or use py3 features in py2.
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then
pytype -x
fire/fire_test.py
fire/inspectutils_test.py
fire/test_components_py3.py;
elif [[ $TRAVIS_PYTHON_VERSION != 3.4 ]]; then
pytype;
fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.* && $TRAVIS_PYTHON_VERSION != 3.4 ]]; then pytype; fi
2 changes: 1 addition & 1 deletion 2 README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Python Fire [![PyPI](https://img.shields.io/pypi/pyversions/fire.svg?style=plastic)](https://github.com/google/python-fire)
# Python Fire [![PyPI](https://img.shields.io/pypi/pyversions/fire.svg?style=plastic)](https://github.com/google/python-fire) [![Build Status](https://travis-ci.org/google/python-fire.svg?branch=master)](https://travis-ci.org/google/python-fire)

_Python Fire is a library for automatically generating command line interfaces
(CLIs) from absolutely any Python object._
Expand Down
13 changes: 9 additions & 4 deletions 13 fire/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,15 @@ def MemberVisible(component, name, member, class_attrs=None, verbose=False):
if class_attrs is None:
class_attrs = inspectutils.GetClassAttrsDict(class_attrs) or {}
class_attr = class_attrs.get(name)
if class_attr and class_attr.kind in ('method', 'property'):
# methods and properties should be accessed on instantiated objects,
# not uninstantiated classes.
return False
if class_attr:
if class_attr.kind in ('method', 'property'):
# methods and properties should be accessed on instantiated objects,
# not uninstantiated classes.
return False
tuplegetter = getattr(collections, '_tuplegetter', type(None))
if isinstance(class_attr.object, tuplegetter):
# backward compatibility: namedtuple attributes were properties
return False
if (six.PY2 and inspect.isfunction(component)
and name in ('func_closure', 'func_code', 'func_defaults',
'func_dict', 'func_doc', 'func_globals', 'func_name')):
Expand Down
1 change: 1 addition & 0 deletions 1 setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',

'Operating System :: OS Independent',
'Operating System :: POSIX',
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.