archiTop/deck_builder/final_deck_builder.py
def _construct_card_deck(self, card_list: List[ScryfallCard],
                             hidden=True) -> Optional[dict]:
        """Chooses DeckBuilder based on amount of amount of cards passed.

        Chooses SingleCardDeckBuilder when card list contains a single card.
        MultiCardDeckBuilder when card list contains multiple cards.

        Args:
            card_list:  List of cards to create deck asset for
            hidden:     Whether deck is hidden or not (face down)
                        Defaults to true.

        Returns:
            Result from deck builder or None when List is empty
        """
        if len(card_list) > 1:
            builder = MultiCardDeckBuilder(card_list, hidden, self.custom_back_url)
        elif len(card_list) == 1:
            builder = SingleCardDeckBuilder(card_list, hidden, self.custom_back_url)
        else:
            return None

        return builder.create_deck()
Chooses DeckBuilder based on amount of amount of cards passed.

        Chooses SingleCardDeckBuilder when card list contains a single card.
        MultiCardDeckBuilder when card list contains multiple cards.

        Args:
            card_list:  List of cards to create deck asset for
            hidden:     Whether deck is hidden or not (face down)
                        Defaults to true.

        Returns:
            Result from deck builder or None when List is empty
        
Chooses DeckBuilder based on amount of amount of cards passed.
Chooses SingleCardDeckBuilder when card list contains a single card.
MultiCardDeckBuilder when card list contains multiple cards.
Chooses DeckBuilder based on amount of amount of cards passed . Chooses SingleCardDeckBuilder when card list contains a single card . MultiCardDeckBuilder when card list contains multiple cards .
def _construct_card_deck(self, card_list: List[ScryfallCard],
                             hidden=True) -> Optional[dict]:
        if len(card_list) > 1:
            builder = MultiCardDeckBuilder(card_list, hidden, self.custom_back_url)
        elif len(card_list) == 1:
            builder = SingleCardDeckBuilder(card_list, hidden, self.custom_back_url)
        else:
            return None
        return builder.create_deck()
def _construct_card_deck ( self , card_list : List [ ScryfallCard ] , hidden = True ) -> Optional [ dict ] : if len ( card_list ) > 1 : builder = MultiCardDeckBuilder ( card_list , hidden , self . custom_back_url ) elif len ( card_list ) == 1 : builder = SingleCardDeckBuilder ( card_list , hidden , self . custom_back_url ) else : return None return builder . create_deck ( )
Chooses DeckBuilder based on amount of amount of cards passed.
Chooses DeckBuilder based on amount of amount of cards passed .
"""Chooses DeckBuilder based on amount of amount of cards passed.

        Chooses SingleCardDeckBuilder when card list contains a single card.
        MultiCardDeckBuilder when card list contains multiple cards.

        Args:
            card_list:  List of cards to create deck asset for
            hidden:     Whether deck is hidden or not (face down)
                        Defaults to true.

        Returns:
            Result from deck builder or None when List is empty
        """
Result from deck builder or None when List is empty
Result from deck builder or None when List is empty
self
card_list
List[ScryfallCard]
List of cards to create deck asset for
List of cards to create deck asset for
hidden
Whether deck is hidden or not (face down)
Defaults to true.
Whether deck is hidden or not ( face down ) Defaults to true .