-
-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Labels
bugSomething isn't workingSomething isn't workingchangelogChanges should be written to the changelog file.Changes should be written to the changelog file.test
Milestone
Description
Is this not yet supported?
match sort_by:
case 'date': sort_by = ' updated DESC,'
case _: sort_by = ''output:
Traceback (most recent call last):
File "C:\Users\bach_ar\.conda\envs\311\Lib\site-packages\libcst\_parser\base_parser.py", line 151, in _add_token
plan = stack[-1].dfa.transitions[transition]
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: TokenType(NAME)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\bach_ar\.conda\envs\311\Scripts\unimport.exe\__main__.py", line 7, in <module>
File "C:\Users\bach_ar\.conda\envs\311\Lib\site-packages\unimport\__main__.py", line 6, in main
main = Main.run()
^^^^^^^^^^
File "C:\Users\bach_ar\.conda\envs\311\Lib\site-packages\unimport\main.py", line 112, in run
refactor_result = refactor_string(source=result.source, unused_imports=result.unused_imports)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\bach_ar\.conda\envs\311\Lib\site-packages\unimport\refactor.py", line 131, in refactor_string
wrapper = cst.MetadataWrapper(cst.parse_module(source))
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\bach_ar\.conda\envs\311\Lib\site-packages\libcst\_parser\entrypoints.py", line 109, in parse_module
result = _parse(
^^^^^^^
File "C:\Users\bach_ar\.conda\envs\311\Lib\site-packages\libcst\_parser\entrypoints.py", line 56, in _parse
return _pure_python_parse(
^^^^^^^^^^^^^^^^^^^
File "C:\Users\bach_ar\.conda\envs\311\Lib\site-packages\libcst\_parser\entrypoints.py", line 89, in _pure_python_parse
result = parser.parse()
^^^^^^^^^^^^^^
File "C:\Users\bach_ar\.conda\envs\311\Lib\site-packages\libcst\_parser\base_parser.py", line 110, in parse
self._add_token(token)
File "C:\Users\bach_ar\.conda\envs\311\Lib\site-packages\libcst\_parser\base_parser.py", line 186, in _add_token
raise ParserSyntaxError(
libcst._exceptions.ParserSyntaxError: Syntax Error @ 535:9.
Incomplete input. Encountered 'sort_by', but expected ';', or 'NEWLINE'.
match sort_by:
^Hint: no error when running with --check
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingchangelogChanges should be written to the changelog file.Changes should be written to the changelog file.test
Projects
Status
✅ Done