[elbe-devel] [PATCH 2/3] dump, elbexml, xmlpreprocess: fix style errors

Olivier Dion dion at linutronix.de
Wed Sep 18 18:17:47 CEST 2019


On 2019-09-18T09:44:00-0400, Bastian Germann <bage at linutronix.de> wrote:

> > @@ -176,7 +176,8 @@ class ElbeXML(object):
> >  
> >          return replace_localmachine(mirror, initvm)
> >  
> > -    def validate_repo(self, r):
> > +    @staticmethod
> > +    def validate_repo(r):

> Again, you would also have to change the callers.

Not true.  You can call static methods on object directly.
----------------------------------------------------------------------
class Foo(object):
      @staticmethod
      def bar():
          print("Static bar!")
Foo().bar()
----------------------------------------------------------------------

-- 
Olivier Dion
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen



More information about the elbe-devel mailing list