Skip to content

Commit

Permalink
reverted changes and added self.is_dead(warn_only=True)
Browse files Browse the repository at this point in the history
  • Loading branch information
amanmoon committed Dec 19, 2023
1 parent 21a2f38 commit 2b8b0f3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/sage/databases/oeis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1148,11 +1148,11 @@ def is_dead(self, warn_only=False):
True
"""
if warn_only:
if 'dead' in self.keywords(warn=False):
if 'dead' in self.keywords(warn_only):
from warnings import warn
warn('This sequence is dead: "{}: {}"'.format(self.id(), self.name()), RuntimeWarning)
else:
return 'dead' in self.keywords()
return 'dead' in self.keywords(warn_only)

def is_finite(self):
r"""
Expand Down Expand Up @@ -2019,7 +2019,8 @@ def test_compile_sage_code(self):
RuntimeWarning: This sequence is dead: ...
True
"""
if self.is_dead(warn_only=True):
if self.is_dead():
self.is_dead(warn_only=True)
return True
filt = self.programs(language='sage')
if filt:
Expand Down

0 comments on commit 2b8b0f3

Please sign in to comment.