(self, args: T.Iterable[str])
return self
Add two CompilerArgs while taking into account overriding of arguments
        and while preserving the order of arguments as much as possible
Add two CompilerArgs while taking into account overriding of arguments
        and while preserving the order of arguments as much as possible
Add two CompilerArgs while taking into account overriding of arguments and while preserving the order of arguments as much as possible
def __iadd__(self, args: T.Iterable[str]) -> 'CompilerArgs':
        '''
        Add two CompilerArgs while taking into account overriding of arguments
        and while preserving the order of arguments as much as possible
        '''
        tmp_pre = collections.deque()  # type: T.Deque[str]
        if not isinstance(args, collections.abc.Iterable):
            raise TypeError(f'can only concatenate Iterable[str] (not "{args}") to CompilerArgs')
        for arg in args:
            # If the argument can be de-duped, do it either by removing the
            # previous occurrence of it and adding a new one, or not adding the
            # new occurrence.
            dedup = self._can_dedup(arg)
            if dedup is Dedup.UNIQUE:
                # Argument already exists and adding a new instance is useless
                if arg in self._container or arg in self.pre or arg in self.post:
                    continue
            if self._should_prepend(arg):
                tmp_pre.appendleft(arg)
            else:
                self.post.append(arg)
        self.pre.extendleft(tmp_pre)
        #pre and post is going to be merged later before a iter call
        return self
def __iadd__ ( self , args : T . Iterable [ str ] ) -> 'CompilerArgs' : tmp_pre = collections . deque ( ) # type: T.Deque[str] if not isinstance ( args , collections . abc . Iterable ) : raise TypeError ( f'can only concatenate Iterable[str] (not "{args}") to CompilerArgs' ) for arg in args : # If the argument can be de-duped, do it either by removing the # previous occurrence of it and adding a new one, or not adding the # new occurrence. dedup = self . _can_dedup ( arg ) if dedup is Dedup . UNIQUE : # Argument already exists and adding a new instance is useless if arg in self . _container or arg in self . pre or arg in self . post : continue if self . _should_prepend ( arg ) : tmp_pre . appendleft ( arg ) else : self . post . append ( arg ) self . pre . extendleft ( tmp_pre ) #pre and post is going to be merged later before a iter call return self