We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3275d2 commit f9b09c1Copy full SHA for f9b09c1
feature_300.py
@@ -0,0 +1,18 @@
1
+# Feature Implementation for Issue #300
2
+from typing import Optional
3
+
4
+class FeatureManager:
5
+ def __init__(self):
6
+ self.features = {}
7
8
+ def register(self, name: str, enabled: bool = True) -> None:
9
+ self.features[name] = enabled
10
11
+ def get(self, name: str) -> Optional[bool]:
12
+ return self.features.get(name)
13
14
+# Tests
15
+mgr = FeatureManager()
16
+mgr.register("test", True)
17
+assert mgr.get("test") == True
18
+print("Feature tests passed!")
0 commit comments