Conditions | 1 |
Total Lines | 4 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 1 |
Changes | 0 |
1 | """Module with identifier types for Links and Interfaces""" |
||
35 | 1 | def __new__(cls, interface_1: InterfaceID, interface_2: InterfaceID): |
|
36 | 1 | raw_str = ":".join(sorted((interface_1, interface_2))) |
|
37 | 1 | digest = hashlib.sha256(raw_str.encode('utf-8')).hexdigest() |
|
38 | return super().__new__(cls, digest) |
||
39 |