mirror of
				https://github.com/qurator-spk/dinglehopper.git
				synced 2025-10-22 14:04:16 +02:00 
			
		
		
		
	🧹 Make process_dir() keyword arguments keyword-only
This commit is contained in:
		
							parent
							
								
									945aec5673
								
							
						
					
					
						commit
						932bfafc7d
					
				
					 2 changed files with 10 additions and 10 deletions
				
			
		|  | @ -187,7 +187,7 @@ def process( | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def process_dir( | def process_dir( | ||||||
|     gt, ocr, report_prefix, reports_folder, metrics, differences, textequiv_level |     gt, ocr, report_prefix, reports_folder, *, metrics, differences, textequiv_level | ||||||
| ): | ): | ||||||
|     for gt_file in os.listdir(gt): |     for gt_file in os.listdir(gt): | ||||||
|         gt_file_path = os.path.join(gt, gt_file) |         gt_file_path = os.path.join(gt, gt_file) | ||||||
|  | @ -269,9 +269,9 @@ def main( | ||||||
|                 ocr, |                 ocr, | ||||||
|                 report_prefix, |                 report_prefix, | ||||||
|                 reports_folder, |                 reports_folder, | ||||||
|                 metrics, |                 metrics=metrics, | ||||||
|                 differences, |                 differences=differences, | ||||||
|                 textequiv_level, |                 textequiv_level=textequiv_level, | ||||||
|             ) |             ) | ||||||
|     else: |     else: | ||||||
|         process( |         process( | ||||||
|  |  | ||||||
|  | @ -21,9 +21,9 @@ def test_cli_directory(tmp_path): | ||||||
|         os.path.join(data_dir, "directory-test", "ocr"), |         os.path.join(data_dir, "directory-test", "ocr"), | ||||||
|         "report", |         "report", | ||||||
|         str(tmp_path / "reports"), |         str(tmp_path / "reports"), | ||||||
|         False, |         metrics=False, | ||||||
|         True, |         differences=True, | ||||||
|         "line", |         textequiv_level="line", | ||||||
|     ) |     ) | ||||||
| 
 | 
 | ||||||
|     assert os.path.exists(tmp_path / "reports/1.xml-report.json") |     assert os.path.exists(tmp_path / "reports/1.xml-report.json") | ||||||
|  | @ -45,9 +45,9 @@ def test_cli_fail_without_gt(tmp_path): | ||||||
|         os.path.join(data_dir, "directory-test", "ocr"), |         os.path.join(data_dir, "directory-test", "ocr"), | ||||||
|         "report", |         "report", | ||||||
|         str(tmp_path / "reports"), |         str(tmp_path / "reports"), | ||||||
|         False, |         metrics=False, | ||||||
|         True, |         differences=True, | ||||||
|         "line", |         textequiv_level="line", | ||||||
|     ) |     ) | ||||||
| 
 | 
 | ||||||
|     assert len(os.listdir(tmp_path / "reports")) == 2 * 2 |     assert len(os.listdir(tmp_path / "reports")) == 2 * 2 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue