from .base import Shipper


class DHL(Shipper):
    barcode_pattern = r'^\d{10}$'
    shipper = 'DHL'

from .base import Shipper


class DHL(Shipper):
    barcode_pattern = r'^\d{10}$'
    shipper = 'DHL'

    @property
    def valid_checksum(self):
        sequence, check_digit = self.tracking_number[:-1], self.tracking_number[-1]
        return int(sequence) % 7 == int(check_digit)

Add DHL waybill checksum validation
Add DHL waybill checksum validation

  from .base import Shipper
  
  
  class DHL(Shipper):
      barcode_pattern = r'^\d{10}$'
      shipper = 'DHL'
  
+     @property
+     def valid_checksum(self):
+         sequence, check_digit = self.tracking_number[:-1], self.tracking_number[-1]
+         return int(sequence) % 7 == int(check_digit)
+ 
Add DHL waybill checksum validation
## Code Before:
from .base import Shipper


class DHL(Shipper):
    barcode_pattern = r'^\d{10}$'
    shipper = 'DHL'

## Instruction:
Add DHL waybill checksum validation
## Code After:
from .base import Shipper


class DHL(Shipper):
    barcode_pattern = r'^\d{10}$'
    shipper = 'DHL'

    @property
    def valid_checksum(self):
        sequence, check_digit = self.tracking_number[:-1], self.tracking_number[-1]
        return int(sequence) % 7 == int(check_digit)
