From 420df4311db44074805b97c6588c473a844a3da3 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com> Date: Thu, 9 Dec 2021 11:23:59 +0100 Subject: [PATCH] Decorate with `@staticmethod` if `self` is not used Fixes Codacy alert: Method could be a function Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com> --- trojans/tncc-emulate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trojans/tncc-emulate.py b/trojans/tncc-emulate.py index 88a8d6cd..c6bb3f52 100755 --- a/trojans/tncc-emulate.py +++ b/trojans/tncc-emulate.py @@ -368,7 +368,8 @@ class tncc: objs = [] class ParamHTMLParser(HTMLParser.HTMLParser): - def handle_starttag(self, tag, attrs): + @staticmethod + def handle_starttag(tag, attrs): if tag.lower() == 'param': for key, value in attrs: if key.lower() == 'value': -- 2.49.0