Skip to content

Commit

Permalink
* Add workaround to support pip -e (pypa/pip#7953)
Browse files Browse the repository at this point in the history
* Fix exception when invalid strategy is specified
  • Loading branch information
jschwartzentruber committed Oct 21, 2020
1 parent b2a5b81 commit bbccef7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
"""Lithium setup script"""

import site

from setuptools import setup

site.ENABLE_USER_SITE = True


if __name__ == "__main__":
setup()
6 changes: 3 additions & 3 deletions src/lithium/reducer.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ def error(_, message):
early_parser.add_argument(
"--strategy", default=DEFAULT_STRATEGY, choices=strategies.keys()
)
args = early_parser.parse_known_args(argv)[0]
atom = args.atom if args else DEFAULT_TESTCASE
args = early_parser.parse_known_args(argv)
atom = args[0].atom if args else DEFAULT_TESTCASE
self.strategy = strategies.get(
args.strategy if args else None, strategies[DEFAULT_STRATEGY]
args[0].strategy if args else None, strategies[DEFAULT_STRATEGY]
)()

grp_opt.add_argument(
Expand Down

0 comments on commit bbccef7

Please sign in to comment.