Skip to content

Commit

Permalink
minor tweeks
Browse files Browse the repository at this point in the history
  • Loading branch information
dynnamitt committed Oct 19, 2022
1 parent ba8d930 commit 10fcdde
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = ""
authors = ["kjetil midtlie <[email protected]>"]
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"
Expand Down
8 changes: 4 additions & 4 deletions src/ts_language_collection/langs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 10fcdde

Please sign in to comment.