fixed pep8 errors
This commit is contained in:
		
							parent
							
								
									9506a106f4
								
							
						
					
					
						commit
						bdfb86bd0f
					
				
							
								
								
									
										24
									
								
								src/main.py
								
								
								
								
							
							
						
						
									
										24
									
								
								src/main.py
								
								
								
								
							| 
						 | 
				
			
			@ -10,15 +10,15 @@ def geslabt001_to_sheet(in_tsv_file_path: Path, out_tsv_file_path: Path):
 | 
			
		|||
        table_header_has_been_written = False
 | 
			
		||||
        for line in inf.readlines():
 | 
			
		||||
            ignore_line = False
 | 
			
		||||
            # Entité dépensière : 				AESJULLIEN		AES RENNES METROPOLE MC JULLIEN									Crédits reçus : 								40,000.00	
 | 
			
		||||
            # 															Disponible : 								24,743.14	
 | 
			
		||||
            # 																								
 | 
			
		||||
            # 																								
 | 
			
		||||
            # N° commande	Souche		Libellé commande				Date commande	Raison sociale fournisseur	Montant consommé sur exercice antérieur	Montant consommé sur l'exercice			Montant réservé					Montant facturé		Code origine	Nature dépense	Statut		Cde groupée            
 | 
			
		||||
            # Entité dépensière : 				AESJULLIEN		AES RENNES METROPOLE MC JULLIEN									Crédits reçus : 								40,000.00
 | 
			
		||||
            # 															Disponible : 								24,743.14
 | 
			
		||||
            #
 | 
			
		||||
            #
 | 
			
		||||
            # N° commande	Souche		Libellé commande				Date commande	Raison sociale fournisseur	Montant consommé sur exercice antérieur	Montant consommé sur l'exercice			Montant réservé					Montant facturé		Code origine	Nature dépense	Statut		Cde groupée
 | 
			
		||||
            if re.match(r'^Entité dépensière', line):
 | 
			
		||||
                ignore_line = True
 | 
			
		||||
                ignore_line = True  # noqa
 | 
			
		||||
            is_table_header = re.match(r'^N° commande', line) is not None
 | 
			
		||||
            # 19,572.00	19AESMCJ		CAMERA ZYLA 5.5 sCMOS				04/11/19	ANDOR TECHNOLOGY LIMITED	0.00	13,681.56			0.00					0.00		635991	IM			
 | 
			
		||||
            # 19,572.00	19AESMCJ		CAMERA ZYLA 5.5 sCMOS				04/11/19	ANDOR TECHNOLOGY LIMITED	0.00	13,681.56			0.00					0.00		635991	IM
 | 
			
		||||
            if is_table_header and not table_header_has_been_written:
 | 
			
		||||
                outf.write('# %s' % line)
 | 
			
		||||
                table_header_has_been_written = True
 | 
			
		||||
| 
						 | 
				
			
			@ -31,11 +31,11 @@ def geslabt002_to_sheet(in_tsv_file_path: Path, out_tsv_file_path: Path):
 | 
			
		|||
    with open(in_tsv_file_path) as inf, open(out_tsv_file_path, 'wt') as outf:
 | 
			
		||||
        table_header_has_been_written = False
 | 
			
		||||
        for line in inf.readlines():
 | 
			
		||||
            # Entité dépensière : 				AESJULLIEN		AES RENNES METROPOLE MC JULLIEN									Crédits reçus : 								40,000.00	
 | 
			
		||||
            # 															Disponible : 								24,743.14	
 | 
			
		||||
            # 																								
 | 
			
		||||
            # 																								
 | 
			
		||||
            # N° commande	Souche		Libellé commande				Date commande	Raison sociale fournisseur	Montant consommé sur exercice antérieur	Montant consommé sur l'exercice			Montant réservé					Montant facturé		Code origine	Nature dépense	Statut		Cde groupée            
 | 
			
		||||
            # Entité dépensière : 				AESJULLIEN		AES RENNES METROPOLE MC JULLIEN									Crédits reçus : 								40,000.00
 | 
			
		||||
            # 															Disponible : 								24,743.14
 | 
			
		||||
            #
 | 
			
		||||
            #
 | 
			
		||||
            # N° commande	Souche		Libellé commande				Date commande	Raison sociale fournisseur	Montant consommé sur exercice antérieur	Montant consommé sur l'exercice			Montant réservé					Montant facturé		Code origine	Nature dépense	Statut		Cde groupée
 | 
			
		||||
            is_table_header = re.match(r'^N° com. GESLAB', line) is not None
 | 
			
		||||
            # for some strange reason, the column 'N° com. GESLAB''s contents are alternatively something like '1952-12-17 12:00:00 AM' and something like '19,855.00'
 | 
			
		||||
            if is_table_header and not table_header_has_been_written:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue