From 10fcdde4fa6200e97373bc9e8bdf8fe285764a83 Mon Sep 17 00:00:00 2001 From: kjetil midtlie Date: Wed, 19 Oct 2022 14:59:54 +0200 Subject: [PATCH] minor tweeks --- pyproject.toml | 2 +- src/ts_language_collection/langs.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f1ebb70..498ac56 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ description = "" authors = ["kjetil midtlie "] readme = "README.md" packages = [{include = "ts_language_collection", from = "src"}] -include = ["src/**/*.so","src/**/*.dll","src/**/*pickle"] +include = ["src/**/*.so","src/**/*.dll","src/**/*.pickle"] [tool.poetry.dependencies] python = "^3.10" diff --git a/src/ts_language_collection/langs.py b/src/ts_language_collection/langs.py index 7c1bdad..914c03f 100644 --- a/src/ts_language_collection/langs.py +++ b/src/ts_language_collection/langs.py @@ -10,14 +10,14 @@ lang_names = pickle.load(infile) -def get_language(language): +def get_language(language:str) -> Language: assert language in lang_names, "Not a valid language option!" return Language(str(common.lib_filename(HERE)), language) -def get_parser(language): - language = get_language(language) +def get_parser(language:str) -> Parser: + lang_obj = get_language(language) parser = Parser() - parser.set_language(language) + parser.set_language(lang_obj) return parser