MCPcopy Create free account
hub / github.com/SourceCode-AI/aura / get_encoding

Function get_encoding

aura/analyzers/python_src_inspector.py:154–161  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

152
153
154def get_encoding(path):
155 try:
156 with open(path, "rb") as fd:
157 if sys.version_info.major == 2:
158 return find_encoding_py2(fd.readline)
159 return tokenize.detect_encoding(fd.readline)[0]
160 except SyntaxError:
161 return "utf-8"
162
163
164def get_environment():

Callers 1

mainFunction · 0.85

Calls 1

find_encoding_py2Function · 0.85

Tested by

no test coverage detected