Skip to content

Commit

Permalink
Merge c632ce6 into 28a2525
Browse files Browse the repository at this point in the history
  • Loading branch information
josephcalise authored Jun 6, 2023
2 parents 28a2525 + c632ce6 commit 71c41fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[mypy]
; A good-first-issue is to add types to a file
; As you do start adding them in files and slowly make the excluded files empty
files = ts/context.py
files = ts/context.py, ts/model_server.py

exclude = examples, binaries, ts_scripts, test, kubernetes, benchmarks, model-archiver, workflow-archiver, ts/tests, ts/utils

Expand Down
10 changes: 5 additions & 5 deletions ts/model_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import sys
import tempfile
from builtins import str

from typing import Dict
import psutil

from ts.arg_parser import ArgParser
Expand All @@ -18,7 +18,7 @@
TS_NAMESPACE = "org.pytorch.serve.ModelServer"


def start():
def start() -> None:
"""
This is the entry point for model server
:return:
Expand Down Expand Up @@ -104,7 +104,8 @@ def start():
sys.exit(1)
ts_conf_file = ts_config

platform_path_separator = {"Windows": "", "Darwin": ".:", "Linux": ".:"}
platform_path_separator = {
"Windows": "", "Darwin": ".:", "Linux": ".:"}
class_path = "{}{}".format(
platform_path_separator[platform.system()],
os.path.join(ts_home, "ts", "frontend", "*"),
Expand Down Expand Up @@ -207,7 +208,7 @@ def start():
print("start java frontend failed:", sys.exc_info())


def load_properties(file_path):
def load_properties(file_path: str) -> Dict[str, str]:
"""
Read properties file into map.
"""
Expand All @@ -220,7 +221,6 @@ def load_properties(file_path):
if len(pair) > 1:
key = pair[0].strip()
props[key] = pair[1].strip()

return props


Expand Down

0 comments on commit 71c41fb

Please sign in to comment.