File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -31,10 +31,16 @@ class CombyBinary(CombyInterface):
3131 language: str
3232 The default language that should be assumed when dealing with source
3333 text where no specific language is specified.
34+ version: str
35+ The version of Comby that is used by this binary.
3436 """
3537 location = attr .ib (type = str , default = 'comby' )
3638 language = attr .ib (type = str , default = '.c' )
3739
40+ @property
41+ def version (self ) -> str :
42+ return self .call ('-version' ).strip ()
43+
3844 def call (self , args : str , text : Optional [str ] = None ) -> str :
3945 """Calls the Comby binary.
4046
Original file line number Diff line number Diff line change @@ -15,10 +15,17 @@ class CombyInterface(abc.ABC):
1515
1616 Attributes
1717 ----------
18+ version: str
19+ The version of Comby that is provided by this interface.
1820 language: str
1921 The default language that should be assumed when dealing with source
2022 text where no specific language is specified.
2123 """
24+ @property
25+ @abc .abstractmethod
26+ def version (self ) -> str :
27+ ...
28+
2229 @property
2330 @abc .abstractmethod
2431 def language (self ) -> str :
You can’t perform that action at this time.
0 commit comments