MCPcopy Create free account
hub / github.com/Boris-code/feapder / create

Method create

feapder/commands/create/create_init.py:15–30  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

13
14class CreateInit:
15 def create(self):
16 __all__ = []
17
18 import os
19
20 path = os.getcwd()
21 for file in os.listdir(path):
22 if file.endswith(".py") and not file.startswith("__init__"):
23 model = file.split(".")[0]
24 __all__.append(model)
25
26 del os
27
28 with open("__init__.py", "w", encoding="utf-8") as file:
29 text = "__all__ = %s" % dumps_json(__all__)
30 file.write(text)

Callers

nothing calls this directly

Calls 1

dumps_jsonFunction · 0.90

Tested by

no test coverage detected