You've already forked HeurAMS-legacy
进一步实现 interface
This commit is contained in:
@@ -6,6 +6,7 @@ import pathlib
|
||||
import typing
|
||||
import toml
|
||||
import json
|
||||
import bidict
|
||||
|
||||
class AtomRegister(TypedDict):
|
||||
nucleon: Nucleon
|
||||
@@ -17,6 +18,7 @@ class AtomRegister(TypedDict):
|
||||
orbital: Orbital
|
||||
orbital_path: pathlib.Path
|
||||
orbital_fmt: str
|
||||
runtime: dict
|
||||
|
||||
class Atom():
|
||||
"""
|
||||
@@ -29,6 +31,7 @@ class Atom():
|
||||
|
||||
def __init__(self, ident = ""):
|
||||
self.ident = ident
|
||||
atom_registry[ident] = self
|
||||
self.register: AtomRegister = { # type: ignore
|
||||
"nucleon": None,
|
||||
"nucleon_path": None,
|
||||
@@ -76,4 +79,6 @@ class Atom():
|
||||
|
||||
@staticmethod
|
||||
def placeholder():
|
||||
return (Electron.placeholder(), Nucleon.placeholder(), {})
|
||||
return (Electron.placeholder(), Nucleon.placeholder(), {})
|
||||
|
||||
atom_registry: bidict.bidict[str, Atom] = bidict.bidict()
|
||||
|
||||
Reference in New Issue
Block a user