(stmt: cst.Import | cst.ImportFrom)
| 496 | |
| 497 | @staticmethod |
| 498 | def is_github_import(stmt: cst.Import | cst.ImportFrom) -> bool: |
| 499 | return ( |
| 500 | isinstance(stmt, cst.Import) |
| 501 | and ( |
| 502 | isinstance(stmt.names[0].name, cst.Name) |
| 503 | and stmt.names[0].name.value == "github" |
| 504 | or isinstance(stmt.names[0].name, cst.Attribute) |
| 505 | and stmt.names[0].name.value.value == "github" |
| 506 | ) |
| 507 | or isinstance(stmt, cst.ImportFrom) |
| 508 | and isinstance(stmt.module, cst.Attribute) |
| 509 | and stmt.module.value.value == "github" |
| 510 | ) |
| 511 | |
| 512 | @staticmethod |
| 513 | def is_datetime_import(stmt: cst.Import | cst.ImportFrom) -> bool: |
no outgoing calls
no test coverage detected