mirror of
				https://github.com/python-escpos/python-escpos
				synced 2025-10-23 09:30:00 +00:00 
			
		
		
		
	add missing close() method in metaclass
This commit is contained in:
		@@ -154,6 +154,10 @@ class Escpos(object, metaclass=ABCMeta):
 | 
				
			|||||||
        """Open a printer device/connection."""
 | 
					        """Open a printer device/connection."""
 | 
				
			||||||
        pass
 | 
					        pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def close(self):
 | 
				
			||||||
 | 
					        """Close a printer device/connection."""
 | 
				
			||||||
 | 
					        pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @abstractmethod
 | 
					    @abstractmethod
 | 
				
			||||||
    def _raw(self, msg: bytes) -> None:
 | 
					    def _raw(self, msg: bytes) -> None:
 | 
				
			||||||
        """Send raw data to the printer.
 | 
					        """Send raw data to the printer.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -173,4 +173,4 @@ def test_read_no_device(cupsprinter) -> None:
 | 
				
			|||||||
    THEN check the return value is b''
 | 
					    THEN check the return value is b''
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
    cupsprinter.device = None
 | 
					    cupsprinter.device = None
 | 
				
			||||||
    assert cupsprinter._read() == b''
 | 
					    assert cupsprinter._read() == b""
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user