|
1 | 1 | import pathlib
|
| 2 | +import random |
2 | 3 | import sys
|
3 | 4 | import traceback
|
4 | 5 | import warnings
|
@@ -155,6 +156,24 @@ def test_common_func(config: test_common):
|
155 | 156 | """
|
156 | 157 |
|
157 | 158 |
|
| 159 | +def get_random_compliment(): |
| 160 | + compliments = [ |
| 161 | + "Your code is as elegant as a perfectly balanced binary tree! 🌳", |
| 162 | + "You're the human equivalent of well-documented code! ⭐", |
| 163 | + "Bug-free code? Must be your work! 🚀", |
| 164 | + "You make debugging look like an art form! 🎨", |
| 165 | + "Your commits are poetry in motion! 📝", |
| 166 | + "You're the exception handler of excellence! 🛡️", |
| 167 | + "Your code reviews are legendary! 👑", |
| 168 | + "You're the MVP of the repository! 🏆", |
| 169 | + ] |
| 170 | + return random.choice(compliments) |
| 171 | + |
| 172 | + |
| 173 | +def recognize_func(): |
| 174 | + print(get_random_compliment()) |
| 175 | + |
| 176 | + |
158 | 177 | def main():
|
159 | 178 | print(CONTENTCTL_5_WARNING)
|
160 | 179 | try:
|
@@ -210,6 +229,7 @@ def main():
|
210 | 229 | "test_servers": test_servers.model_construct(**t.__dict__),
|
211 | 230 | "release_notes": release_notes.model_construct(**config_obj),
|
212 | 231 | "deploy_acs": deploy_acs.model_construct(**t.__dict__),
|
| 232 | + "recognize": tyro.conf.Subcommand(), |
213 | 233 | }
|
214 | 234 | )
|
215 | 235 |
|
@@ -240,6 +260,8 @@ def main():
|
240 | 260 | deploy_acs_func(updated_config)
|
241 | 261 | elif type(config) is test or type(config) is test_servers:
|
242 | 262 | test_common_func(config)
|
| 263 | + elif type(config) is tyro.conf.Subcommand: |
| 264 | + recognize_func() |
243 | 265 | else:
|
244 | 266 | raise Exception(f"Unknown command line type '{type(config).__name__}'")
|
245 | 267 | except FileNotFoundError as e:
|
|
0 commit comments