def _build_connection_args(self, klass):
bases = [base for base in klass.__bases__ if base is not object]<EOL>all_args = []<EOL>for cls in [klass] + bases:<EOL><INDENT>try:<EOL><INDENT>args = inspect.getfullargspec(cls.__init__).args<EOL><DEDENT>except AttributeError:<EOL><INDENT>args = inspect.getargspec(cls.__init__).args<EOL><DEDENT>for arg in args:<EOL><INDENT>if arg in all_args:<EOL><INDENT>continue<EOL><DEDENT>all_args.append(arg)<EOL><DEDENT><DEDENT>all_args.remove('<STR_LIT>')<EOL>return all_args<EOL>
Read connection args spec, exclude self from list of possible

        :param klass: Redis connection class.