Skip to content

Commit

Permalink
Change Project repr.
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr committed Mar 3, 2022
1 parent 72015c1 commit 7559513
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 1 addition & 4 deletions signac/contrib/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,7 @@ def __str__(self):
return str(self.root_directory())

def __repr__(self):
# TODO: Fix this too.
return "{type}.get_project({root})".format(
type=self.__class__.__name__, root=repr(self.root_directory())
)
return f"{self.__class__.__name__}({repr(self.root_directory())})"

def _repr_html_(self):
"""Project details in HTML format for use in IPython environment.
Expand Down
1 change: 1 addition & 0 deletions tests/test_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def setUp(self, request):
pythonpath = [os.getcwd()] + pythonpath.split(":")
os.environ["PYTHONPATH"] = ":".join(pythonpath)
self.tmpdir = TemporaryDirectory(prefix="signac_")
self.project_name = f"Project({repr(os.path.realpath(self.tmpdir.name))})"
request.addfinalizer(self.tmpdir.cleanup)
self.cwd = os.getcwd()
os.chdir(self.tmpdir.name)
Expand Down

0 comments on commit 7559513

Please sign in to comment.