From a6e2c8e6dbf0caac6c0881d776be33ac4a81485a Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Wed, 23 Jun 2021 20:23:54 -0700 Subject: [PATCH] Fix Python 3.8 incompatibility --- amanuensis/cli/lexicon.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/amanuensis/cli/lexicon.py b/amanuensis/cli/lexicon.py index 99a3150..dfa44a2 100644 --- a/amanuensis/cli/lexicon.py +++ b/amanuensis/cli/lexicon.py @@ -1,4 +1,3 @@ -from argparse import BooleanOptionalAction import logging from sqlalchemy import update @@ -42,8 +41,10 @@ def command_create(args): @add_argument("name") -@add_argument("--public", action=BooleanOptionalAction) -@add_argument("--join", action=BooleanOptionalAction) +@add_argument("--public", dest="public", action="store_const", const=True) +@add_argument("--no-public", dest="public", action="store_const", const=False) +@add_argument("--join", dest="join", action="store_const", const=True) +@add_argument("--no-join", dest="join", action="store_const", const=False) def command_edit(args): """ Update a lexicon's configuration.