@@ -492,31 +492,26 @@ class ConflictReason(object):
492492 Folder = object ()
493493 File = object ()
494494 AutorenameFailed = object ()
495- Unknown = object ()
496495
497496 def __init__ (self ,
498497 folder = None ,
499498 file = None ,
500499 autorename_failed = None ,
501- unknown = None ,
502500 ** kwargs ):
503501 """
504502 Only one argument can be set.
505503
506504 :param bool folder: Conflict with a folder.
507505 :param bool file: Conflict with a file.
508506 :param bool autorename_failed: Could not autorename.
509- :type unknown: bool
510507 """
511508 assert_only_one (folder = folder ,
512509 file = file ,
513510 autorename_failed = autorename_failed ,
514- unknown = unknown ,
515511 ** kwargs )
516512 self .folder = None
517513 self .file = None
518514 self .autorename_failed = None
519- self .unknown = None
520515
521516 if folder is not None :
522517 assert isinstance (folder , bool ), 'folder must be of type bool'
@@ -533,11 +528,6 @@ def __init__(self,
533528 self .autorename_failed = autorename_failed
534529 self ._tag = 'autorename_failed'
535530
536- if unknown is not None :
537- assert isinstance (unknown , bool ), 'unknown must be of type bool'
538- self .unknown = unknown
539- self ._tag = 'unknown'
540-
541531 def is_folder (self ):
542532 return self ._tag == 'folder'
543533
@@ -547,9 +537,6 @@ def is_file(self):
547537 def is_autorename_failed (self ):
548538 return self ._tag == 'autorename_failed'
549539
550- def is_unknown (self ):
551- return self ._tag == 'unknown'
552-
553540 @classmethod
554541 def from_json (self , obj ):
555542 obj = copy .copy (obj )
@@ -560,8 +547,6 @@ def from_json(self, obj):
560547 return obj
561548 if obj == 'autorename_failed' :
562549 return obj
563- if obj == 'unknown' :
564- return obj
565550 return ConflictReason (** obj )
566551
567552 def to_json (self ):
@@ -571,8 +556,6 @@ def to_json(self):
571556 return self ._tag
572557 if self ._tag == 'autorename_failed' :
573558 return self ._tag
574- if self ._tag == 'unknown' :
575- return self ._tag
576559
577560 def __repr__ (self ):
578561 return 'ConflictReason(%r)' % self ._tag
@@ -591,8 +574,6 @@ def __init__(self,
591574 self .reason = ConflictReason (file = True )
592575 if reason == ConflictReason .AutorenameFailed :
593576 self .reason = ConflictReason (autorename_failed = True )
594- if reason == ConflictReason .Unknown :
595- self .reason = ConflictReason (unknown = True )
596577
597578 @classmethod
598579 def from_json (cls , obj ):
0 commit comments