Oops
This commit is contained in:
parent
f0f49cce18
commit
865f66b79d
6 changed files with 15 additions and 3 deletions
|
@ -29,3 +29,8 @@ sshare-validate = "sshare.validator:main"
|
||||||
|
|
||||||
[tool.setuptools_scm]
|
[tool.setuptools_scm]
|
||||||
version_file = "src/sshare/version.py"
|
version_file = "src/sshare/version.py"
|
||||||
|
|
||||||
|
[tool.pytest.ini_options]
|
||||||
|
addopts = [
|
||||||
|
"--import-mode=importlib"
|
||||||
|
]
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
|
|
||||||
import importlib
|
import importlib
|
||||||
import importlib.util
|
import importlib.util
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
from sshare.plugin.config import Flag
|
from sshare.plugin.config import Flag
|
||||||
from sshare.plugin.config import NoDefault
|
from sshare.plugin.config import NoDefault
|
||||||
|
@ -49,9 +52,9 @@ class PluginLoader:
|
||||||
]
|
]
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def at(logger=None, config=dict(), flags=dict(), *args):
|
def at(*args, logger=None, config=dict(), flags=dict()):
|
||||||
return [
|
return [
|
||||||
Plugin.external(plugin, logger, config, flags)
|
Plugin.external(Path(plugin), logger, config, flags)
|
||||||
for plugin
|
for plugin
|
||||||
in args
|
in args
|
||||||
]
|
]
|
||||||
|
|
|
@ -113,7 +113,7 @@ def main():
|
||||||
arg_parser.add_argument(
|
arg_parser.add_argument(
|
||||||
"plugins",
|
"plugins",
|
||||||
nargs="*",
|
nargs="*",
|
||||||
help="plugin(s) to be validated",
|
help="plugin(s) to be validated (Default: all external plugins)",
|
||||||
)
|
)
|
||||||
arguments = arg_parser.parse_args()
|
arguments = arg_parser.parse_args()
|
||||||
if arguments.dev:
|
if arguments.dev:
|
||||||
|
|
4
tests/test_test.py
Normal file
4
tests/test_test.py
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
from src.sshare.plugin.config import Argument
|
||||||
|
|
||||||
|
def test_foo():
|
||||||
|
assert True
|
Loading…
Reference in a new issue