(self)
| 3238 | return args |
| 3239 | |
| 3240 | def main(self): |
| 3241 | changes = False |
| 3242 | if args.subcommand == "fetch": |
| 3243 | changes = self.fetch(self.args.api, self.args.api_version, self.args.commit, self.args.spec) |
| 3244 | elif args.subcommand == "index": |
| 3245 | changes = self.index( |
| 3246 | self.args.github_path, |
| 3247 | self.args.spec, |
| 3248 | self.args.index_filename, |
| 3249 | self.args.check_verbs, |
| 3250 | self.args.dry_run, |
| 3251 | ) |
| 3252 | elif self.args.subcommand == "suggest": |
| 3253 | if self.args.component == "paths": |
| 3254 | changes = self.suggest_paths( |
| 3255 | self.args.spec, self.args.index_filename, self.args.class_name, self.args.dry_run |
| 3256 | ) |
| 3257 | if self.args.component == "schemas": |
| 3258 | changes = self.suggest_schemas( |
| 3259 | self.args.spec, self.args.index_filename, self.args.class_name, self.args.add, self.args.dry_run |
| 3260 | ) |
| 3261 | elif self.args.subcommand == "apply": |
| 3262 | changes = self.apply( |
| 3263 | self.args.github_path, |
| 3264 | self.args.spec, |
| 3265 | self.args.index_filename, |
| 3266 | self.args.class_name, |
| 3267 | self.args.dry_run, |
| 3268 | self.args.tests, |
| 3269 | self.args.new_schemas, |
| 3270 | ) |
| 3271 | elif self.args.subcommand == "create": |
| 3272 | if self.args.component == "class": |
| 3273 | changes = self.create_class( |
| 3274 | self.args.github_path, |
| 3275 | self.args.spec, |
| 3276 | self.args.index_filename, |
| 3277 | self.args.class_name, |
| 3278 | self.args.parent, |
| 3279 | self.args.docs_url, |
| 3280 | self.args.schema, |
| 3281 | self.args.dry_run, |
| 3282 | self.args.tests, |
| 3283 | self.args.new_schemas, |
| 3284 | ) |
| 3285 | if self.args.component == "method": |
| 3286 | changes = self.create_method( |
| 3287 | self.args.spec, |
| 3288 | self.args.index_filename, |
| 3289 | self.args.class_name, |
| 3290 | self.args.method_name, |
| 3291 | self.args.api_verb.lower(), |
| 3292 | self.args.api_path, |
| 3293 | self.args.api_response, |
| 3294 | self.args.return_property, |
| 3295 | self.args.dry_run, |
| 3296 | self.args.new_schemas, |
| 3297 | ) |
no test coverage detected