[test.pyright] suppress unneeded error & warning messages

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2022-04-22 11:16:41 +02:00
parent 5a156a0bef
commit cf644b413e
2 changed files with 2 additions and 1 deletions

1
manage
View file

@ -702,6 +702,7 @@ test.pyright() {
pyenv.cmd npx --no-install pyright -p pyrightconfig-ci.json \
| grep -v ".py$" \
| grep -v '/engines/.*.py.* - warning: "logger" is not defined'\
| grep -v '/plugins/.*.py.* - error: "logger" is not defined'\
| grep -v '/engines/.*.py.* - warning: "supported_languages" is not defined' \
| grep -v '/engines/.*.py.* - warning: "language_aliases" is not defined'
dump_return $?

View file

@ -372,7 +372,7 @@ def _get_lang_to_lc_dict(lang_list: List[str]) -> Dict[str, str]:
# babel's get_global contains all sorts of miscellaneous locale and territory related data
# see get_global in: https://github.com/python-babel/babel/blob/master/babel/core.py
def _get_from_babel(lang_code: str, key: str):
def _get_from_babel(lang_code: str, key):
match = get_global(key).get(lang_code.replace('-', '_'))
# for some keys, such as territory_aliases, match may be a list
if isinstance(match, str):