File tree Expand file tree Collapse file tree 5 files changed +5
-39
lines changed Expand file tree Collapse file tree 5 files changed +5
-39
lines changed Original file line number Diff line number Diff line change 1919from  dataclasses  import  dataclass , field 
2020from  datetime  import  datetime 
2121from  pathlib  import  Path 
22- from  typing  import  Literal , Type ,  Union 
22+ from  typing  import  Literal , Union 
2323
2424from  packaging .version  import  InvalidVersion 
2525from  packaging .version  import  Version  as  PackagingVersion 
@@ -223,7 +223,6 @@ class VersionCommand(ABC):
223223    version commands for several programming languages""" 
224224
225225    project_file_name : str 
226-     version_calculator_class : Type [VersionCalculator ] =  VersionCalculator 
227226
228227    def  __init__ (self ) ->  None :
229228        self .project_file_path  =  Path .cwd () /  self .project_file_name 
@@ -249,6 +248,3 @@ def project_found(self) -> bool:
249248        Returns True if a command has detected a corresponding project 
250249        """ 
251250        return  self .project_file_path .exists ()
252- 
253-     def  get_version_calculator (self ) ->  VersionCalculator :
254-         return  self .version_calculator_class ()
Original file line number Diff line number Diff line change 2424from  pontos .testing  import  temp_directory , temp_file 
2525from  pontos .version .cmake  import  CMakeVersionCommand , CMakeVersionParser 
2626from  pontos .version .errors  import  VersionError 
27- from  pontos .version .version  import  Version , VersionCalculator 
28- 
29- 
30- class  CMakeVersionCommandTestCase (unittest .TestCase ):
31-     def  test_get_version_calculator (self ):
32-         cmake  =  CMakeVersionCommand ()
33- 
34-         self .assertIsInstance (cmake .get_version_calculator (), VersionCalculator )
27+ from  pontos .version .version  import  Version 
3528
3629
3730class  VerifyCMakeVersionCommandTestCase (unittest .TestCase ):
Original file line number Diff line number Diff line change 2525from  pontos .testing  import  temp_directory , temp_file 
2626from  pontos .version .errors  import  VersionError 
2727from  pontos .version .go  import  GoVersionCommand 
28- from  pontos .version .version  import  Version ,  VersionCalculator 
28+ from  pontos .version .version  import  Version 
2929
3030
3131@dataclass  
@@ -42,13 +42,6 @@ class StdOutput:
4242\n """
4343
4444
45- class  GoVersionCommandTestCase (unittest .TestCase ):
46-     def  test_get_version_calculator (self ):
47-         go  =  GoVersionCommand ()
48- 
49-         self .assertIsInstance (go .get_version_calculator (), VersionCalculator )
50- 
51- 
5245class  GetCurrentGoVersionCommandTestCase (unittest .TestCase ):
5346    def  test_getting_version (self ):
5447        with  temp_file (
Original file line number Diff line number Diff line change 2323from  pontos .testing  import  temp_directory , temp_file 
2424from  pontos .version .errors  import  VersionError 
2525from  pontos .version .javascript  import  JavaScriptVersionCommand 
26- from  pontos .version .version  import  Version , VersionCalculator 
27- 
28- 
29- class  JavaScriptVersionCommandTestCase (unittest .TestCase ):
30-     def  test_get_version_calculator (self ):
31-         js  =  JavaScriptVersionCommand ()
32- 
33-         self .assertIsInstance (js .get_version_calculator (), VersionCalculator )
26+ from  pontos .version .version  import  Version 
3427
3528
3629class  GetCurrentJavaScriptVersionCommandTestCase (unittest .TestCase ):
Original file line number Diff line number Diff line change 2626from  pontos .testing  import  temp_directory , temp_file , temp_python_module 
2727from  pontos .version .errors  import  VersionError 
2828from  pontos .version .python  import  PythonVersionCommand 
29- from  pontos .version .version  import  Version , VersionCalculator 
30- 
31- 
32- class  PythonVersionCommandTestCase (unittest .TestCase ):
33-     def  test_get_version_calculator (self ):
34-         python  =  PythonVersionCommand ()
35- 
36-         self .assertIsInstance (
37-             python .get_version_calculator (), VersionCalculator 
38-         )
29+ from  pontos .version .version  import  Version 
3930
4031
4132class  GetCurrentPythonVersionCommandTestCase (unittest .TestCase ):
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments