Skip to content

Commit 1630ed8

Browse files
authored
Merge pull request #36 from OpenRL-Lab/dev
Dev
2 parents b520109 + 9edc999 commit 1630ed8

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

openplugin/cli/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# limitations under the License.
1616

1717
""""""
18-
import os
18+
1919

2020
import click
2121
from click.core import Context, Option

openplugin/install/local_install.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
import tempfile
2222
import zipfile
2323

24+
from openplugin.utils.check import check_local_plugin
2425
from openplugin.utils.local_plugin_utils import get_local_plugin_name
2526
from openplugin.utils.util import (
2627
get_plugin_directory,
2728
get_plugin_version,
2829
make_zip_file,
2930
)
30-
from openplugin.utils.check import check_local_plugin
3131

3232

3333
def install_local_plugin() -> bool:
@@ -41,7 +41,9 @@ def install_local_plugin() -> bool:
4141
return False
4242
tempdir = tempfile.mkdtemp()
4343
filepath = make_zip_file(
44-
dir_to_put_file_in=tempdir, plugin_directory=local_plugin_directory, plugin_name=plugin_name
44+
dir_to_put_file_in=tempdir,
45+
plugin_directory=local_plugin_directory,
46+
plugin_name=plugin_name,
4547
)
4648

4749
z = zipfile.ZipFile(filepath)

openplugin/template/base_template.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
""""""
1818
from abc import ABC, abstractmethod
1919
from pathlib import Path
20-
from typing import Any, Dict, List, Optional, Tuple, Union
21-
22-
from openplugin.template.utils import render_ROOT_URL
20+
from typing import Union
2321

2422

2523
class BaseTemplate(ABC):

openplugin/utils/check.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
# limitations under the License.
1616

1717
""""""
18-
from typing import Tuple, Union
1918
import json
20-
2119
from pathlib import Path
20+
from typing import Tuple, Union
21+
2222

23-
def check_info_file(info_file:Union[str,Path]) -> Tuple[bool, str]:
23+
def check_info_file(info_file: Union[str, Path]) -> Tuple[bool, str]:
2424
"""Check if the given info file is valid."""
2525
message = ""
2626
success = True
@@ -57,5 +57,5 @@ def check_local_plugin(plugin_path: Union[str, Path]) -> Tuple[bool, str]:
5757
success = False
5858
message = f"Plugin path {plugin_path} does not contain all required files."
5959
else:
60-
success, message = check_info_file(plugin_path/"info.json")
60+
success, message = check_info_file(plugin_path / "info.json")
6161
return success, message

0 commit comments

Comments
 (0)