# HG changeset patch # User Laurent Peuch # Date 1576713847 -3600 # Node ID 0e9ce897dfdf65a69c596685d1b401fd103d280b # Parent dadbd4148a4429fd461fa7051c836915b6a197ca [mypy/fix] Incompatible types in assignment (expression has type "staticmethod", variable has type "Callable[[ETag], Any]") diff -r dadbd4148a44 -r 0e9ce897dfdf cubicweb/web/http_headers.py --- a/cubicweb/web/http_headers.py Thu Dec 19 10:31:49 2019 +0100 +++ b/cubicweb/web/http_headers.py Thu Dec 19 01:04:07 2019 +0100 @@ -899,6 +899,7 @@ def __repr__(self): return "Etag(%r, weak=%r)" % (self.tag, self.weak) + @staticmethod def parse(tokens): tokens = tuple(tokens) if len(tokens) == 1 and not isinstance(tokens[0], Token): @@ -910,8 +911,6 @@ raise ValueError("Invalid ETag.") - parse = staticmethod(parse) - def generate(self): if self.weak: return 'W/'+quoteString(self.tag)