You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
produces this output from pytype-single --output - repro.py:
Traceback (most recent call last):
File ".../bin/pytype-single", line 8, in <module>
sys.exit(main())
File ".../lib/python3.8/site-packages/pytype/single.py", line 87, in main
return _run_pytype(options)
File ".../lib/python3.8/site-packages/pytype/single.py", line 98, in _run_pytype
return io.process_one_file(options)
File ".../lib/python3.8/site-packages/pytype/io.py", line 77, in wrapper
return f(*args, **kwargs)
File ".../lib/python3.8/site-packages/pytype/io.py", line 226, in process_one_file
ret = check_or_generate_pyi(options, loader)
File ".../lib/python3.8/site-packages/pytype/io.py", line 77, in wrapper
return f(*args, **kwargs)
File ".../lib/python3.8/site-packages/pytype/io.py", line 169, in check_or_generate_pyi
errorlog, result, ast = generate_pyi(
File ".../lib/python3.8/site-packages/pytype/io.py", line 123, in generate_pyi
ret = _call(analyze.infer_types, src, options, loader, ctx=ctx)
File ".../lib/python3.8/site-packages/pytype/io.py", line 77, in wrapper
return f(*args, **kwargs)
File ".../lib/python3.8/site-packages/pytype/io.py", line 88, in _call
return analyze_types(
File ".../lib/python3.8/site-packages/pytype/analyze.py", line 121, in infer_types
ast = ctx.vm.compute_types(defs)
File ".../lib/python3.8/site-packages/pytype/tracer_vm.py", line 758, in compute_types
self.pytd_for_types(defs),
File ".../lib/python3.8/site-packages/pytype/tracer_vm.py", line 641, in pytd_for_types
d = option.to_pytd_def(self.ctx.exitpoint, name)
File ".../lib/python3.8/site-packages/pytype/abstract/_base.py", line 234, in to_pytd_def
return self.ctx.pytd_convert.value_to_pytd_def(node, self, name)
File ".../lib/python3.8/site-packages/pytype/output.py", line 461, in value_to_pytd_def
md = metadata.to_pytd(v.to_metadata())
File ".../lib/python3.8/site-packages/pytype/overlays/attr_overlay.py", line 231, in to_metadata
"init": self._current_args["init"],
TypeError: 'NoneType' object is not subscriptable
File: repro.py
With pytype 2024.01.05 on Python 3.8, this input:
produces this output from
pytype-single --output - repro.py
:Changing the input to
works:
The text was updated successfully, but these errors were encountered: