Renaming the total attribute as oatop
This commit is contained in:
@@ -16,8 +16,8 @@ class Minter():
|
||||
digitcount: ClassVar[int] = 10
|
||||
|
||||
oacounter: int = 0
|
||||
oatop: int = 0
|
||||
template: str = ""
|
||||
total: int = 0
|
||||
prefix: str = ""
|
||||
mask: str = ""
|
||||
active_counters: list[Counter] = field(default_factory=list)
|
||||
@@ -65,14 +65,14 @@ class Minter():
|
||||
return -1
|
||||
if not all(char in ("d", "e") for char in self.mask.rstrip("k")[1:]):
|
||||
return -1
|
||||
self.total = 1
|
||||
self.oatop = 1
|
||||
for chr in self.mask:
|
||||
match chr:
|
||||
case "e":
|
||||
self.total *= self.alphacount
|
||||
self.oatop *= self.alphacount
|
||||
case "d":
|
||||
self.total *= self.digitcount
|
||||
return self.total
|
||||
self.oatop *= self.digitcount
|
||||
return self.oatop
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user