Commit f782ac19 authored by Thomas Nadovich's avatar Thomas Nadovich 🌸
Browse files

Merge branch 'feature/fix-underscores' into 'devel'

Feature/fix underscores

Closes #50 and #57

See merge request burt/software/burt-util!66
parents b3cfcf33 2531fed2
Pipeline #18293 passed with stage
in 49 seconds
......@@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## [3.3.1]
- fixed bug introduced in 3.3.0 where using underscores in commands would cause
them to fail
## [3.3.0]
- added objdict-generate as command, using objdict-generate 1.0.7
- fixed make setup to install the right python version
......
......@@ -96,7 +96,7 @@ setup: ~/.pyenv
# because otherwise pyinstaller won't be able to find the shared
# python libraries from within pipenv
# https://stackoverflow.com/questions/58548730/how-to-use-pyinstaller-with-pipenv-pyenv
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.9.5
env PYTHON_CONFIGURE_OPTS="--enable-shared" ~/.pyenv/bin/pyenv install 3.9.5
# pyenv install 3.6.9
# lastly, we actually set up the pipenv enviroment
pipenv install --dev -v
......
......@@ -4,9 +4,14 @@ class AliasedGroup(click.Group):
"""subclass of click.Group to support abbreviated and aliased commands
Mostly copied from the AliasedGroup implementation documented here:
https://github.com/pallets/click/blob/6.x/examples/aliases/aliases.py
Auto replaces underscores with hyphens when looking up commands
"""
def get_command(self, ctx, cmd_name):
# click replaces underscores with hyphens in command names, so we do
# the same here to maintain compatibility with either usage
cmd_name = cmd_name.replace('_','-')
# if the command matches a known command, go with that
rv = click.Group.get_command(self, ctx, cmd_name)
if rv is not None:
......
#!/usr/bin/env python3
__version__ = "3.3.0"
__version__ = "3.3.1"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment