mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 17:31:34 -05:00
Previously this was causing the wrapper function to become a command before it started mirroring the original (functools.wraps), which meant any previous option decorators were "lost".* We didn't notice the problem in the original PR [1] because the new command under test has its option decorators *after* the command decorator, in contrast with all other (now broken) commands. The original wrapper applied the functools decorator first [2], so this change just reinstates that ordering. *This is a hand-wavey explanation as I haven't looked into how functools.wraps interacts with option decorators. [1]:922fd2f333# [2]:922fd2f333 (diff-c4e75c8613e916687a97191a7a79110dfb47e96ef7df96f7ba25dd94ba64943dL101)