Skip to content

Commit

Permalink
not working yet
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghaibao committed Sep 27, 2023
1 parent 95d3ecf commit a4fec59
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions goatools/anno/init/reader_idtogos.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,15 @@ def _init_w_godag(self, prt=stdout):
prt.write(f"**WARNING: {goid} obsolete in DAG, kept\n")
to_add.add(goid)
elif self.obsolete == "replace":
prt.write(f"**WARNING: {goid} obsolete in DAG, replaced\n")
to_replace = set()
if "replaced_by" in goobj.__dict__:
to_add |= set(goobj.replaced_by)
to_replace |= set(goobj.replaced_by)
if "consider" in goobj.__dict__:
to_add |= set(goobj.consider)
to_replace |= set(goobj.consider)
prt.write(
f"**WARNING: {goid} obsolete in DAG, replaced by {to_replace}\n"
)
to_add |= to_replace
elif self.obsolete == "skip":
prt.write(f"**WARNING: {goid} obsolete in DAG, skipped\n")
else:
Expand Down

0 comments on commit a4fec59

Please sign in to comment.