Skip to content

Commit

Permalink
Merge pull request #84 from cs50/develop
Browse files Browse the repository at this point in the history
v2.1.3
  • Loading branch information
Kareem Zidane authored Oct 6, 2017
2 parents b61c38d + c2e9de6 commit ec4abc3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion check50.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def print_json(results):
pass

output.append(obj)
print(json.dumps(output))
print(json.dumps(output, cls=Encoder))


def import_checks(identifier):
Expand Down Expand Up @@ -426,6 +426,15 @@ def wrapper(self):
return decorator


class Encoder(json.JSONEncoder):
"""Custom class for JSON encoding."""

def default(self, o):
if o == EOF:
return "EOF"
return o.__dict__


class File(object):
"""Generic class to represent file in check directory."""

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ class CustomInstall(install):
"console_scripts": ["check50=check50:main"]
},
url="https://github.com/cs50/check50",
version="2.1.2"
version="2.1.3"
)

0 comments on commit ec4abc3

Please sign in to comment.