|
26 | 26 |
|
27 | 27 | ifTYPE_CHECKING: |
28 | 28 | fromgit.repoimportRepo |
29 | | -fromgit.refsimportHead,TagReference,Reference |
| 29 | +fromgit.refsimportHead,TagReference,RemoteReference,Reference |
30 | 30 | from .logimportRefLogEntry |
31 | 31 | fromgit.configimportGitConfigParser |
32 | 32 | fromgit.objects.commitimportActor |
@@ -65,7 +65,6 @@ class SymbolicReference(object): |
65 | 65 | def__init__(self,repo:'Repo',path:PathLike,check_path:bool=False): |
66 | 66 | self.repo=repo |
67 | 67 | self.path=path |
68 | | -self.ref=self.reference |
69 | 68 |
|
70 | 69 | def__str__(self)->str: |
71 | 70 | returnstr(self.path) |
@@ -363,15 +362,8 @@ def set_reference(self, ref: Union[Commit_ish, 'SymbolicReference', str], |
363 | 362 | returnself |
364 | 363 |
|
365 | 364 | # aliased reference |
366 | | -# reference = property(_get_reference, set_reference, doc="Returns the Reference we point to") # type: ignore |
367 | | - |
368 | | -@property |
369 | | -defreference(self)->'Reference': |
370 | | -returnself._get_reference() |
371 | | - |
372 | | -@reference.setter |
373 | | -defreference(self,*args,**kwargs): |
374 | | -returnself.set_reference(*args,**kwargs) |
| 365 | +reference=property(_get_reference,set_reference,doc="Returns the Reference we point to")# type: ignore |
| 366 | +ref:Union['Head','TagReference','RemoteReference','Reference']=reference# type: ignore |
375 | 367 |
|
376 | 368 | defis_valid(self)->bool: |
377 | 369 | """ |
|