@@ -86,9 +86,9 @@ def fix_lookup_path(cls, data:Any, info: ValidationInfo)->Any:
86
86
@staticmethod
87
87
def get_lookups (text_field : str , director :DirectorOutputDto , ignore_lookups :set [str ]= LOOKUPS_TO_IGNORE )-> list [Lookup ]:
88
88
# Comprehensively match all kinds of lookups, including inputlookup and outputlookup
89
- inputLookupsToGet = set (re .findall (r'inputlookup(?:\s*(?:(?:append|strict|start|max)\s*=\s*(?:true|t|false|f))){0,4}\s+([^\s]+)' , text_field ))
90
- outputLookupsToGet = set (re .findall (r'outputlookup(?:\s*(?:(?:append|create_empty|override_if_empty|max|key_field|allow_updates|createinapp|create_context|output_format)\s*=\s*[^\s]*))*\s+([^\s]+)' ,text_field ))
91
- lookupsToGet = set (re .findall (r'(?:(?<!output)(?<!input))lookup(?:\s*(?:(?:local|update)\s*=\s*(?:true|t|false|f))){0,2}\s+([^\s]+)' , text_field ))
89
+ inputLookupsToGet = set (re .findall (r'inputlookup(?:\s*(?:(?:append|strict|start|max)\s*=\s*(?:true|t|false|f))){0,4}\s+([^\s\| ]+)' , text_field ))
90
+ outputLookupsToGet = set (re .findall (r'outputlookup(?:\s*(?:(?:append|create_empty|override_if_empty|max|key_field|allow_updates|createinapp|create_context|output_format)\s*=\s*[^\s]*))*\s+([^\s\| ]+)' ,text_field ))
91
+ lookupsToGet = set (re .findall (r'(?:(?<!output)(?<!input))lookup(?:\s*(?:(?:local|update)\s*=\s*(?:true|t|false|f))){0,2}\s+([^\s\| ]+)' , text_field ))
92
92
93
93
94
94
input_lookups = Lookup .mapNamesToSecurityContentObjects (list (inputLookupsToGet - LOOKUPS_TO_IGNORE ), director )
@@ -131,10 +131,7 @@ def app_filename(self)->FilePath:
131
131
2. Only apply the datetime stamp if it is version > 1. This makes the code a small fraction
132
132
more complicated, but preserves longstanding CSV that have not been modified in a long time
133
133
'''
134
- if self .version > 1 :
135
- return pathlib .Path (f"{ self .filename .stem } .{ self .lookup_type } " ) #type: ignore
136
- else :
137
- return pathlib .Path (f"{ self .filename .stem } _{ self .date .year } { self .date .month :02} { self .date .day :02} .{ self .lookup_type } " ) #type: ignore
134
+ return pathlib .Path (f"{ self .filename .stem } _{ self .date .year } { self .date .month :02} { self .date .day :02} .{ self .lookup_type } " ) #type: ignore
138
135
139
136
class CSVLookup (FileBackedLookup ):
140
137
lookup_type :Literal [Lookup_Type .csv ]
0 commit comments