From 27c8f9ac708b381ff8e1f96c0291c3f22fa8c2bb Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Sat, 3 Dec 2022 21:43:21 +0100 Subject: [PATCH] Using static constants for classes and groups --- src/solo_turnier/competition_class.py | 7 ++++--- src/solo_turnier/group.py | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/solo_turnier/competition_class.py b/src/solo_turnier/competition_class.py index c222bba..1058ed1 100644 --- a/src/solo_turnier/competition_class.py +++ b/src/solo_turnier/competition_class.py @@ -18,10 +18,11 @@ class CombinedCompetitionClass: Class_t = CompetitionClass | CombinedCompetitionClass class CompetitionClassParser: + NEWC = CompetitionClass('Newc.') + BEG = CompetitionClass('Beg.') + ADV = CompetitionClass('Adv.') + def __init__(self): - self.NEWC = CompetitionClass('Newc.') - self.BEG = CompetitionClass('Beg.') - self.ADV = CompetitionClass('Adv.') self.mapNames = { 'Newc': self.NEWC, diff --git a/src/solo_turnier/group.py b/src/solo_turnier/group.py index 79aabfc..f10fd70 100644 --- a/src/solo_turnier/group.py +++ b/src/solo_turnier/group.py @@ -18,10 +18,11 @@ class CombinedGroup: Group_t = Group | CombinedGroup class GroupParser: + KIN = Group('Kin.') + JUN = Group('Jun.') + JUG = Group('Jug.') + def __init__(self): - self.KIN = Group('Kin.') - self.JUN = Group('Jun.') - self.JUG = Group('Jug.') self.mapNames = { 'Kin': self.KIN,