From daee40ba20d672912d9f9029cc63d068ad7f51de Mon Sep 17 00:00:00 2001 From: NandaScott Date: Mon, 6 Sep 2021 12:20:57 -0400 Subject: [PATCH] Added deprecation warnings to foil and nonfoil --- scrython/cards/cards_object.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scrython/cards/cards_object.py b/scrython/cards/cards_object.py index 6e53de3..62b4d6b 100644 --- a/scrython/cards/cards_object.py +++ b/scrython/cards/cards_object.py @@ -673,23 +673,31 @@ class CardsObject(FoundationObject): return self.scryfallJson['oracle_id'] def foil(self): - """True if this printing exists in a foil version + """True if this printing exists in a foil version. + + DEPRECATION NOTICE: This method will be deprecated on Nov 1, 2021. Returns: boolean """ super(CardsObject, self)._checkForKey('foil') + print('WARNING: This method will be deprecated on Nov 1, 2021. Please use the `finishes` method instead.') + return self.scryfallJson['foil'] def nonfoil(self): """True if this printing does not exist in foil + + DEPRECATION NOTICE: This method will be deprecated on Nov 1, 2021. Returns: boolean """ super(CardsObject, self)._checkForKey('nonfoil') + print('WARNING: This method will be deprecated on Nov 1, 2021. Please use the `finishes` method instead.') + return self.scryfallJson['nonfoil'] def oversized(self):