Compare commits

...

4 Commits

2 changed files with 5 additions and 5 deletions

View File

@@ -131,15 +131,16 @@ class Architecture:
if slot in cls._RegisteringRuntime:
raise InvalidOperationError("Illegal duplicate registrations")
cls._RegisteringRuntime[slot] = Architecture.Registering(slot, target, DependenceModel(Architecture.TypeQuery(dependence) for dependence in dependences), action)
dependences = cls._RegisteringRuntime[slot].dependences
cls._InternalRegisteringComplete()
return cls._RegisteringRuntime[slot].dependences
return dependences
@classmethod
def Contains(cls, type_:type) -> bool:
return type_ in cls._RegisteredObjects
@classmethod
def Get(cls, type_:type) -> Any:
def Get[T](cls, type_:Typen[T]) -> T:
return cls._RegisteredObjects[type_]
@classmethod

View File

@@ -327,7 +327,7 @@ class ToolFile(BaseModel):
except:
pass
with open(self.OriginFullPath, 'w', encoding='utf-8') as f:
json.dump(json_data, f, indent=4)
json.dump(json_data, f, indent=4, ensure_ascii=False)
return self
def SaveAsCsv(self, csv_data:"pd.DataFrame"):
'''
@@ -504,12 +504,11 @@ class ToolFile(BaseModel):
return result
def DirWalk(
self,
top,
topdown: bool = True,
onerror: Optional[Callable] = None,
followlinks: bool = False
) -> Iterator[tuple[dir_name_type, list[dir_name_type], list[file_name_type]]]:
return os.walk(self.OriginFullPath, top=top, topdown=topdown, onerror=onerror, followlinks=followlinks)
return os.walk(self.OriginFullPath, topdown=topdown, onerror=onerror, followlinks=followlinks)
def bool(self):