KOSASIH / SilkRoad

Consider decorating method with @staticmethod PYL-R0201
Performance
Major
5 months ago5 months old
Method doesn't use the class instance and could be converted into a static method
 80                                             height=720,
 81                                             timestamp=0)
 82
 83    def _get_video_image(self) -> cv2.UMat: 84        # Get the next video image
 85        # This is just a placeholder implementation; you would need to modify this
 86        # to fit your specific use case.
Method doesn't use the class instance and could be converted into a static method
 59                         stdout=subprocess.DEVNULL,
 60                         stderr=subprocess.DEVNULL)
 61
 62    async def stop_stream(self): 63        # Stop the live stream
 64        sys.exit(0)
 65
Method doesn't use the class instance and could be converted into a static method
 42        # Add an ICE candidate
 43        await self.pc.addIceCandidate(candidate)
 44
 45    async def start_stream(self, url: str): 46        # Start the live stream
 47        cmd = [
 48            "ffmpeg",
Method doesn't use the class instance and could be converted into a static method
129        # Handle a remote stream being successfully subscribed
130        print("Stream subscribed:", stream.uid)
131
132    async def _on_stream_unsubscribed(self, stream: agora.Stream):133        # Handle a remote stream being unsubscribed
134        print("Stream unsubscribed:", stream.uid)
135
Method doesn't use the class instance and could be converted into a static method
125        # Unsubscribe from the remote stream
126        await self.unsubscribe_remote_stream(stream.uid)
127
128    async def _on_stream_subscribed(self, stream: agora.Stream):129        # Handle a remote stream being successfully subscribed
130        print("Stream subscribed:", stream.uid)
131