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
The issue mentioned in #60, and worked around by removing directories from custody tracking, can still appear in other places, such as in testing for #65, where a glob in the root directory is resulting in a key of glob_manifest:working_dir:*.py, which includes a 'working_dir' component that must be degenericized. Presently, that results in explosions:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "<snip>\.venv\Scripts\anchovy.exe\__main__.py", line 7, in <module>
File "<snip>\anchovy\src\anchovy\cli.py", line 232, in main
run_from_rules(settings, rules, custodian, argv=remaining, prog=f'anchovy {label}')
File "<snip>\anchovy\src\anchovy\cli.py", line 119, in run_from_rules
context.run()
File "<snip>\anchovy\src\anchovy\core.py", line 190, in runself.process(input_paths)
File "<snip>\anchovy\src\anchovy\core.py", line 176, in processself.process(further_processing)
File "<snip>\anchovy\src\anchovy\core.py", line 159, in process
stale, msg =self.custodian.refresh_needed(path, output_paths)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<snip>\anchovy\src\anchovy\custody.py", line 310, in refresh_neededifnotself.check_prior(up_key):
^^^^^^^^^^^^^^^^^^^^^^^^
File "<snip>\anchovy\src\anchovy\custody.py", line 277, in check_priorreturn checker(CustodyEntry(ptype, key, pmeta))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "examples\code_index.py", line 77, in glob_manifest_stale
parent = context.custodian.degenericize_path(path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<snip>\anchovy\src\anchovy\custody.py", line 119, in degenericize_path
dir_key = t.cast('ContextDir', str(path.parents[-2]))
~~~~~~~~~~~~^^^^
File "<snip>\pathlib.py", line 445, in __getitem__raiseIndexError(idx)
IndexError: -2
The text was updated successfully, but these errors were encountered:
pydsigner
changed the title
Custodian.degenericize_path cannot process bare ContextDirs.
Custodian.degenericize_path cannot process bare ContextDirs
Nov 19, 2023
The issue mentioned in #60, and worked around by removing directories from custody tracking, can still appear in other places, such as in testing for #65, where a glob in the root directory is resulting in a key of
glob_manifest:working_dir:*.py
, which includes a'working_dir'
component that must be degenericized. Presently, that results in explosions:The text was updated successfully, but these errors were encountered: