##// END OF EJS Templates
py3: make sure we return str from __repr__...
Pulkit Goyal -
r36067:c4fa47f8 default
parent child Browse files
Show More
@@ -13,6 +13,7 import re
13 13
14 14 from .i18n import _
15 15 from . import (
16 encoding,
16 17 error,
17 18 pathutil,
18 19 util,
@@ -345,7 +346,7 class alwaysmatcher(basematcher):
345 346 return 'all'
346 347
347 348 def __repr__(self):
348 return '<alwaysmatcher>'
349 return r'<alwaysmatcher>'
349 350
350 351 class nevermatcher(basematcher):
351 352 '''Matches nothing.'''
@@ -368,7 +369,7 class nevermatcher(basematcher):
368 369 return False
369 370
370 371 def __repr__(self):
371 return '<nevermatcher>'
372 return r'<nevermatcher>'
372 373
373 374 class patternmatcher(basematcher):
374 375
@@ -397,6 +398,7 class patternmatcher(basematcher):
397 398 def prefix(self):
398 399 return self._prefix
399 400
401 @encoding.strmethod
400 402 def __repr__(self):
401 403 return ('<patternmatcher patterns=%r>' % self._pats)
402 404
@@ -424,6 +426,7 class includematcher(basematcher):
424 426 any(parentdir in self._roots
425 427 for parentdir in util.finddirs(dir)))
426 428
429 @encoding.strmethod
427 430 def __repr__(self):
428 431 return ('<includematcher includes=%r>' % self._pats)
429 432
@@ -452,6 +455,7 class exactmatcher(basematcher):
452 455 def isexact(self):
453 456 return True
454 457
458 @encoding.strmethod
455 459 def __repr__(self):
456 460 return ('<exactmatcher files=%r>' % self._files)
457 461
@@ -492,6 +496,7 class differencematcher(basematcher):
492 496 def isexact(self):
493 497 return self._m1.isexact()
494 498
499 @encoding.strmethod
495 500 def __repr__(self):
496 501 return ('<differencematcher m1=%r, m2=%r>' % (self._m1, self._m2))
497 502
@@ -558,6 +563,7 class intersectionmatcher(basematcher):
558 563 def isexact(self):
559 564 return self._m1.isexact() or self._m2.isexact()
560 565
566 @encoding.strmethod
561 567 def __repr__(self):
562 568 return ('<intersectionmatcher m1=%r, m2=%r>' % (self._m1, self._m2))
563 569
@@ -638,6 +644,7 class subdirmatcher(basematcher):
638 644 def prefix(self):
639 645 return self._matcher.prefix() and not self._always
640 646
647 @encoding.strmethod
641 648 def __repr__(self):
642 649 return ('<subdirmatcher path=%r, matcher=%r>' %
643 650 (self._path, self._matcher))
@@ -671,6 +678,7 class unionmatcher(basematcher):
671 678 r |= v
672 679 return r
673 680
681 @encoding.strmethod
674 682 def __repr__(self):
675 683 return ('<unionmatcher matchers=%r>' % self._matchers)
676 684
General Comments 0
You need to be logged in to leave comments. Login now