Method doesn't use the class instance and could be converted into a static method
50
51 def close(self): ...
52
53 def errorString(self) -> str: 54 return 'error'
55
56
Method doesn't use the class instance and could be converted into a static method
45 def try_connect(self, port: int) -> bool:
46 return True
47
48 def isListening(self) -> bool: 49 return False
50
51 def close(self): ...
Method doesn't use the class instance and could be converted into a static method
42 def __init__(self, editor: MockEditorController, parent=None):
43 super().__init__(parent)
44
45 def try_connect(self, port: int) -> bool: 46 return True
47
48 def isListening(self) -> bool:
Method doesn't use the class instance and could be converted into a static method
29 def __str__(self) -> str:
30 return pformat(self.data)
31
32 def load(self, settings_file: pathlib.Path) -> Dict[str, Any]:33 with settings_file.open() as f:
34 return json.load(f)
35
Method doesn't use the class instance and could be converted into a static method
27 def __init__(self, settings: _NssSettings):
28 self._settings = settings
29
30 def get_ip(self): 31 """Get the IP address of the current machine."""
32 s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
33 try:
Method doesn't use the class instance and could be converted into a static method
81 output = self.editor.output_editor.toPlainText()
82 return output[output.find('# Result:')+10:]
83
84 def _blink_wrapper(self, data: ReceivedData) -> str: 85 return dedent("""
86 node = nuke.toNode("{filename}") or nuke.createNode('BlinkScript', 'name {filename}')
87 knobs = node.knobs()
Description
The method doesn't use its bound instance. Decorate this method with @staticmethod
decorator, so that Python does not have to instantiate a bound method for every instance of this class thereby saving memory and computation. Read more about staticmethods here.