mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-04 09:11:39 +00:00
r temp var -> to func
This commit is contained in:
parent
65d5bbf477
commit
dd6e3d35d2
@ -16,9 +16,11 @@ def is_sulfuras(item: Item) -> None:
|
||||
return item.name == "Sulfuras, Hand of Ragnaros"
|
||||
|
||||
|
||||
def update_item(item: Item):
|
||||
is_backstage_pass = item.name == "Backstage passes to a TAFKAL80ETC concert"
|
||||
def is_backstage_pass(item: Item) -> None:
|
||||
return item.name == "Backstage passes to a TAFKAL80ETC concert"
|
||||
|
||||
|
||||
def update_item(item: Item):
|
||||
if is_sulfuras(item):
|
||||
return
|
||||
|
||||
@ -31,7 +33,7 @@ def update_item(item: Item):
|
||||
item.quality = item.quality + 1
|
||||
return
|
||||
|
||||
if is_backstage_pass:
|
||||
if is_backstage_pass(item):
|
||||
if item.quality < 50:
|
||||
item.quality = item.quality + 1
|
||||
if item.sell_in < 11:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user