| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Start deprecation of Python 3.6
* Removed dependency on attrs and replaced with dataclasses
* Fix typing
* Added comments to assist with dropping support of Python versions in the future.
---------
Co-authored-by: Kevin Van Brunt <kmvanbrunt@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use latest version of mypy and fix type hinting accordingly
Also:
- Update Pipfile to never require mock since we only support Python 3.6+
- Remove Azure Pipelines badge from Readme and fix section links there
- Added an "inv format" task to run black and isort to auto-format all code before a commit
* Try to fix type errors on versions prior to 3.8
* Restored correct types in argparse_custom.py
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cmd2.EightBitBg classes.
Added support for 24-bit/RGB colors with the cmd2.RgbFg and cmd2.RgbBg classes.
Removed dependency on colorama.
Deprecated cmd2.fg. Use cmd2.Fg instead.
Deprecated cmd2.bg. Use cmd2.Bg instead.
Changed type of ansi.allow_style from a string to an ansi.AllowStyle Enum class.
Fixed bug where using choices on a Settable didn't verify that a valid choice had been entered.
|
|
|
|
|
|
|
|
|
| |
extend and modify the
behavior of `ArgparseCompleter`.
* New function `register_argparse_argument_parameter()` allows developers to specify custom
parameters to be passed to the argparse parser's `add_argument()` method. These parameters will
become accessible in the resulting argparse Action object when modifying `ArgparseCompleter` behavior.
|
|
|
|
| |
configuration/commands match developer local commands.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
#1036
|
|
|
|
| |
minor import changes.
|
|
|
|
|
|
| |
The package does not seem to use setuptools or pkg_resources anywhere,
and the dependency is probably leftover after migration to
importlib.metadata.
|
|
|
|
|
|
|
| |
Python 3.5.2 introduced a bug in typing that was fixed in 3.5.3.
The bug in typing prevents the latest nox from running properly.
Ubuntu 16.04 stopped at python 3.5.2.
To work-around, force an older version of nox when testing 3.5.2
|
|
|
|
| |
reference to nox instead.
|
|
|
|
| |
bleeding edge for no good reason
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Importing pkg_resources has a side-effect of scanning every installed
distribution on sys.path to load the metadata, especially the entry
points defined in the packages. This can have a significant
launch-time cost for command line applications when there are a lot of
distributions to scan.
Since cmd2 is only using pkg_resources to find the version of the
installed package, pkg_resources can be replaced with
importlib.metadata. The implementation in the new library is
significantly faster because it goes immediately to the metadata file
for the requested distribution, instead of scanning all of them. There
are also no import-time side-effects.
importlib.metadata is a new standard library module starting with
python 3.8. For earlier versions, a compatible library has been
released to PyPI as 'importlib_metadata'. This change adds the new
dependency with a qualifier so that it is only applied to older
versions of python, and then updates the places that were importing
pkg_resources to look for the different versions of the new library
instead. The documentation configuration is changed to import cmd2
itself to get its version, since the package has to be installed for
the metadata to be available anyway.
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
|
| |
|
| |
|
|
|
|
|
|
|
| |
Also:
- Added isort to Pipenv dev
- Added setup.cfg to make it easy to run flake8, doc8, and isort directly from the command line without using invoke
- Ran isort to sort includes
|
|
|
|
|
|
| |
Also:
- Trivial simplification in setup.py
- Removed redundant copyright.rst file from docs since everything falls under the MIT License and there is already copyright statement in docs
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| | |
# Conflicts:
# setup.py
|
| | |
|
|/
|
|
|
|
| |
- add dev dependency
- add doc8 to tasks.py
- fix all doc8 errors
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit contains a very large number of trivial changes in order to fix flake8 errors and warnings. Predominantly these are whitespace changes.
Additionally, the build for Python 3.7 on TravisCI has been tweaked to fail if there are any flake8 errors using the following commandline:
* flake8 . --count --ignore=E252 --max-complexity=31 --max-line-length=127 --show-source --statistics
NOTE: In the future the max cyclomatic complexity should be lowered, but some improvements need to be made first.
One flake8 error is being ignored entirely:
* E252 missing whitespace around parameter equals
* ignored because it doesn't correctly deal with default argument values after a type hint
A few flake8 errors are being selectively ignored in certain files:
* C901 fuction is too complex
* ignored in argparse_completer.py because the complex code is an override of argparse complexity
* E302 expected 2 blank lines after ...
* ignored in all unit test files for convenience
* F401 module imported but unused
* ignored in cmd2/__init__.py because imports are for convenience of cmd2 developers and backwards compatibility
* F821 undefined name
* ignored in cmd2 script files which are intended to run only within cmd2 applications via pyscript where "app" and "cmd" are defined
|
|\ |
|
| | |
|
|/
|
|
| |
The initial goal was to improve documentation of tab-completion capabilities. But the README got updates in several areas.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
version 17.3.0.
Also:
- In setup.py require version of attrs to be >= 16.3.0
- I think this is right, if there are any issues we can bump this to version 17.1.0
|
| |
|
|
|
|
|
| |
Modified setup.py to include a definition of the extra dependencies required for running unit tests.
This allowed a significant simplification of tox.ini
|
| |
|
|
|
|
|
| |
This is trying to work around a bug in Sphinx:
https://github.com/sphinx-doc/sphinx/issues/5322
|
| |
|
| |
|