File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 44#  The source skeleton for this configuration can be found at
55#  https://github.com/BesLogic/shared-configs/blob/main/ruff.toml
66#  Modifications to this file that are not project-specific should also be done upstream.
7- #  These configs are incompatible with ruff<0.5.7
87
98#  https://docs.astral.sh/ruff/configuration/
109target-version  = " py311" #  Change this to the oldest supported version by your application
1110line-length  = 100 
1211preview  = true 
12+ required-version  = " >=0.9.0" #  Removed ISC compatibility warning
1313
1414[format ]
1515docstring-code-format  = true 
Original file line number Diff line number Diff line change @@ -141,16 +141,16 @@ def __parse_text_file(self, path: str):
141141        self .__ocr_comparison_methods  =  data .get ("methods" , [0 ])
142142        self .__fps_limit  =  data .get ("fps_limit" , 0 )
143143
144-         if  self .__validate_ocr ():
144+         if  not   self .__validate_ocr ():
145145            error_messages .wrong_ocr_values (path )
146146            return 
147147
148148    def  __validate_ocr (self ):
149149        values  =  [* self .__rect , * self .__ocr_comparison_methods , self .__fps_limit ]
150150        return  (
151151            all (value  >=  0  for  value  in  values )  # Check for invalid negative values 
152-             and  self .__rect [1 ]  >  self .__rect [0 ]
153-             and  self .__rect [3 ]  >  self .__rect [2 ]
152+             and  self .__rect [0 ]  <  self .__rect [1 ]
153+             and  self .__rect [2 ]  <  self .__rect [3 ]
154154        )
155155
156156    def  __read_image_bytes (self , path : str ):
Original file line number Diff line number Diff line change @@ -270,6 +270,6 @@ def tesseract_missing(ocr_split_file_path: str):
270270def  wrong_ocr_values (ocr_split_file_path : str ):
271271    set_text_message (
272272        f"{ ocr_split_file_path !r}  
273-         +  "\n Please make sure that `left <  right` and `top <  bottom`. " 
273+         +  "\n Please make sure that `left <  right` and `top <  bottom`. " 
274274        +  "Also check for negative values in the 'methods' or 'fps_limit' settings" 
275275    )
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments