From d9223352b35460e5487db34d11dbf4d00643e941 Mon Sep 17 00:00:00 2001 From: Chris Timperley Date: Wed, 4 Dec 2019 12:16:29 -0500 Subject: [PATCH] Fixed mishandling of Python bugs (fixes #238) (#352) * added python and java languages to Language enum * fixed bad __str__ for Language enum * tagged v2.1.32 --- CHANGELOG.md | 8 ++++++++ bugzoo/core/language.py | 11 +++++------ bugzoo/version.py | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 584ccf259..6bcde605e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## 2.1.32 (2019-12-04) + +### Bug Fixes + +* Fixed bad `__str__` method in `Language` enum +* Re-enabled support for Java and Python bugs + + ## 2.1.31 (2019-10-11) ### Changes diff --git a/bugzoo/core/language.py b/bugzoo/core/language.py index 753a71bef..063f4172c 100644 --- a/bugzoo/core/language.py +++ b/bugzoo/core/language.py @@ -9,17 +9,16 @@ def __getitem__(self, name): class Language(enum.Enum, metaclass=LanguageEnumMeta): C = ("c",) CPP = ("cpp",) - # JAVA = None - # PYTHON = None + JAVA = ('java',) + PYTHON = ('python',) def __init__(self, canonical_name: str) -> None: self.__canonical_name = canonical_name @property def canonical_name(self) -> str: - """ - The canonical name of this language. - """ + """The canonical name of this language.""" return self.__canonical_name - __str__ = canonical_name + def __str__(self) -> str: + return self.__canonical_name diff --git a/bugzoo/version.py b/bugzoo/version.py index 7b061fc75..2d93b16bb 100644 --- a/bugzoo/version.py +++ b/bugzoo/version.py @@ -1 +1 @@ -__version__ = '2.1.31' +__version__ = '2.1.32'