Skip to content

Commit

Permalink
Also change variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 committed Oct 27, 2023
1 parent 4ab4ee4 commit 776a0eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,17 @@ def __init__(self, locator: Optional[xml.sax.xmlreader.Locator] = None):
self.file_name = None
self._not_handled: set[str] = set()
self._idl_post_processors: list[IdlPostProcessor] = []
self.base_clusters: dict[str, Cluster] = {}
self.abstract_base_clusters: dict[str, Cluster] = {}

def AddAbstractBaseCluster(self, name: str, parse_meta: Optional[ParseMetaData] = None) -> Cluster:
"""Creates a new cluster entry for the given name in the list of known
base clusters.
"""
assert name not in self.base_clusters # be unique
assert name not in self.abstract_base_clusters # be unique

cluster = Cluster(side=ClusterSide.CLIENT, name=name,
code=-1, parse_meta=parse_meta)
self.base_clusters[name] = cluster
self.abstract_base_clusters[name] = cluster

return cluster

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ def FinalizeProcessing(self, idl: Idl):
# attempt to find the base. It may be in the "names without ID" however it may also be inside
# existing clusters (e.g. Basic Information)
base: Optional[Cluster] = None
if self.source_name in self.context.base_clusters:
base = self.context.base_clusters[self.source_name]
if self.source_name in self.context.abstract_base_clusters:
base = self.context.abstract_base_clusters[self.source_name]
else:
for c in idl.clusters:
if c.name == self.source_name:
Expand Down

0 comments on commit 776a0eb

Please sign in to comment.