Hotfix: fix cli options for languags.
There are several bugs in the current main branch:
Bug 1
When we specify the languages as in the readme --language=c --language=cpp
, they will interpreted as strings. But later we compare the string value with language id (int value) in FilterByLanguageId. Therefore the check will always fail, hence no data will be processed.
Bug 2
The output schema for BreakPoint
needs to be updated, because a new field called index is introduced.
Bug 3
We use str and str enum interchangeably in the codebase, but they are different, causing runtime errors.
Fixes
- This MR changes LanguageId to be a str and enum
class LanguageId(str, Enum)
. Later we want to upgrade to python3.11 and usestrEnum
instead. - Update
BreakPoint
in the output schema. - Upgrade to python3.11 and use
StrEnum
.
Edited by Hongtao Yang