Skip to content

Commit

Permalink
Fixed mishandling of Python bugs (fixes #238) (#352)
Browse files Browse the repository at this point in the history
* added python and java languages to Language enum

* fixed bad __str__ for Language enum

* tagged v2.1.32
  • Loading branch information
ChrisTimperley authored Dec 4, 2019
1 parent 3801699 commit d922335
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 5 additions & 6 deletions bugzoo/core/language.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion bugzoo/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.1.31'
__version__ = '2.1.32'

0 comments on commit d922335

Please sign in to comment.