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
As mentioned in #5, if the readme option in the [target] section of the config file is not set, treeshaker crashes with:
Traceback (most recent call last):
File ".../venv/bin/treeshaker", line 8, in <module>
sys.exit(main())
File ".../venv/lib/python3.8/site-packages/treeshaker/treeshaker.py", line 293, in main
fire.Fire(run_from_config)
File ".../venv/lib/python3.8/site-packages/fire/core.py", line 141, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File ".../venv/lib/python3.8/site-packages/fire/core.py", line 466, in _Fire
component, remaining_args = _CallAndUpdateTrace(
File ".../venv/lib/python3.8/site-packages/fire/core.py", line 681, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File ".../venv/lib/python3.8/site-packages/treeshaker/treeshaker.py", line 284, in run_from_config
readme=os.path.join(config_path, section['readme']),
File ".../lib/python3.8/posixpath.py", line 90, in join
genericpath._check_arg_types('join', a, *p)
File ".../lib/python3.8/genericpath.py", line 152, in _check_arg_types
raise TypeError(f'{funcname}() argument must be str, bytes, or '
TypeError: join() argument must be str, bytes, or os.PathLike object, not 'NoneType'
This happens because there is no logic in place on this line to check if section['readme'] is None:
As mentioned in #5, if the
readme
option in the[target]
section of the config file is not set, treeshaker crashes with:This happens because there is no logic in place on this line to check if
section['readme']
is None:treeshaker/treeshaker/treeshaker.py
Line 284 in a116fc9
But in
process_module()
itself we do have logic to check ifreadme
is None:treeshaker/treeshaker/treeshaker.py
Lines 207 to 220 in a116fc9
The text was updated successfully, but these errors were encountered: