MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / is_github_import

Method is_github_import

scripts/openapi.py:498–510  ·  view source on GitHub ↗
(stmt: cst.Import | cst.ImportFrom)

Source from the content-addressed store, hash-verified

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:

Callers 2

leave_ModuleMethod · 0.80
leave_ModuleMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected