MCPcopy
hub / github.com/PyGithub/PyGithub / __init__

Method __init__

scripts/openapi.py:1929–1942  ·  view source on GitHub ↗
(self, args: argparse.Namespace)

Source from the content-addressed store, hash-verified

1927
1928class OpenApi:
1929 def __init__(self, args: argparse.Namespace):
1930 self.args = args
1931 self.subcommand = args.subcommand
1932 self.dry_run = args.dry_run
1933 self.verbose = args.verbose
1934
1935 index = (
1936 OpenApi.read_json(args.index_filename) if self.subcommand != "index" and "index_filename" in args else {}
1937 )
1938 self.classes = index.get("classes", {})
1939 self.schema_to_class = index.get("indices", {}).get("schema_to_classes", {})
1940 self.schema_to_class["default"] = ["GithubObject"]
1941 self.spec = OpenApi.read_json(args.spec) if "spec" in args and self.subcommand not in ["fetch", "index"] else {}
1942 self.ignored_schemas = set(index.get("config", {}).get("ignored_schemas", {}))
1943
1944 def as_python_type(
1945 self,

Callers 11

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 2

read_jsonMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected