def __repr__(self): return create_repr( self.__class__.__name__, list(filter(None, [self.short, self.long])) + self.positionals, { "help": self.help })
def __repr__(self): return create_repr( self.__class__.__name__, [self.stream], { "should_close": self.should_close, "encoding": self.encoding, "errors": self.errors } )
def __repr__(self): return create_repr( self.__class__.__name__, [self.positional, self.mapping], { "metavar": self.metavar, "optional": self.optional, "remaining": self.remaining, "help": self.help } )
def __repr__(self): return create_repr( self.__class__.__name__, [self.path], { "mode": self.mode, "buffering": self.buffering, "encoding": self.encoding, "errors": self.errors, "newline": self.newline, "opener": self.opener } )
def test_create_repr(self): self.assert_equal(create_repr("foo"), "foo()") self.assert_equal(create_repr("foo", ["bar", "baz"]), "foo('bar', 'baz')") self.assert_equal(create_repr("foo", kwargs={"spam": "eggs"}), "foo(spam='eggs')") self.assert_equal(create_repr("foo", ["bar", "baz"], {"spam": "eggs"}), "foo('bar', 'baz', spam='eggs')")
def __repr__(self): return create_repr(self.__class__.__name__, kwargs=self.copy_args())
def __repr__(self): return create_repr( self.__class__.__name__, [self.argument, self.choices], Positional.copy_args(self) )
def __repr__(self): return create_repr( self.__class__.__name__, [self.positionals, self.error_message], ConverterBase.copy_args(self) )