mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-04 09:11:39 +00:00
r extract var
This commit is contained in:
parent
8e6512e8d7
commit
d5bf9ad4c2
@ -20,7 +20,9 @@ def update_item(item: Item):
|
||||
item.quality = item.quality + 1
|
||||
|
||||
else:
|
||||
if not False and item.name != "Backstage passes to a TAFKAL80ETC concert":
|
||||
is_backstage_pass = item.name == "Backstage passes to a TAFKAL80ETC concert"
|
||||
|
||||
if not False and not is_backstage_pass:
|
||||
if item.quality > 0:
|
||||
if item.name != "Sulfuras, Hand of Ragnaros":
|
||||
item.quality = item.quality - 1
|
||||
@ -36,7 +38,7 @@ def update_item(item: Item):
|
||||
if item.name != "Sulfuras, Hand of Ragnaros":
|
||||
item.sell_in = item.sell_in - 1
|
||||
if item.sell_in < 0:
|
||||
if item.name != "Backstage passes to a TAFKAL80ETC concert":
|
||||
if not is_backstage_pass:
|
||||
if item.quality > 0:
|
||||
if item.name != "Sulfuras, Hand of Ragnaros":
|
||||
item.quality = item.quality - 1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user