Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Unified Diff: recipe_engine/config_types.py

Issue 1920423003: recipe engine: remove Path.default_tostring_fn (Closed) Base URL: https://github.com/luci/recipes-py.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_engine/config_types.py
diff --git a/recipe_engine/config_types.py b/recipe_engine/config_types.py
index bcfefe567cb58c5e7b67db055e45ba95df0eb32e..54f7b378883646f5a5477c359bd0d4697662b569 100644
--- a/recipe_engine/config_types.py
+++ b/recipe_engine/config_types.py
@@ -59,7 +59,7 @@ class RecipeConfigType(object):
cls._TOSTRING_MAP[cls.__name__] = new_tostring_fn
def default_tostring_fn(self):
- raise NotImplementedError
+ raise NotImplementedError()
def __str__(self):
return self.tostring_fn(self) # pylint: disable=not-callable
@@ -160,15 +160,6 @@ class Path(RecipeConfigType):
return False
return child.pieces[:len(self.pieces)] == self.pieces
- def default_tostring_fn(self):
- suffix = ''
- if self.platform_ext:
- suffix = ', platform_ext=%r' % (self.platform_ext,)
- pieces = ''
- if self.pieces:
- pieces = ', ' + (', '.join(map(repr, self.pieces)))
- return 'Path(\'%s\'%s%s)' % (self.base, pieces, suffix)
-
def __repr__(self):
s = "Path(%r" % self.base
if self.pieces:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698