Skip to content

Commit 12ca095

Browse files
committed
Typing fixes.
1 parent 0e12ae6 commit 12ca095

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/psij/_plugins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def _register_plugin(desc: Descriptor, root_path: str, type: str,
5353
mod = importlib.util.module_from_spec(spec)
5454
spec.loader.exec_module(mod) # type: ignore
5555
cls = getattr(mod, cls_name)
56-
cls.__psij_file__ = mod_path # type: ignore
56+
cls.__psij_file__ = mod_path
5757
except Exception as ex:
5858
s = str(ex)
5959
logger.info(s)

tests/test_executor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def test_env_var(execparams: ExecutorTestParams) -> None:
142142
arguments=['-c', 'env > /tmp/t; echo -n $TEST_VAR$TEST_INT'],
143143
stdout_path=outp))
144144
assert job.spec is not None
145-
job.spec.environment = {'TEST_INT': 1, 'TEST_VAR': '_y_'} # type: ignore
145+
job.spec.environment = {'TEST_INT': 1, 'TEST_VAR': '_y_'}
146146
ex = _get_executor_instance(execparams, job)
147147
ex.submit(job)
148148
status = job.wait(timeout=_get_timeout(execparams))

tests/test_job_spec.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,15 @@ def test_environment_types() -> None:
2929
assert spec.environment is None
3030

3131
spec = JobSpec(environment={'foo': 'bar'})
32-
assert spec.environment['foo'] == 'bar' # type: ignore
32+
assert spec.environment is not None
33+
assert spec.environment['foo'] == 'bar'
3334

3435
spec = JobSpec()
3536
spec.environment = {'foo': 'bar'}
37+
assert spec.environment is not None
3638
assert spec.environment['foo'] == 'bar'
3739

38-
spec.environment = {'foo': 'biz', 'bar': 42} # type: ignore
40+
spec.environment = {'foo': 'biz', 'bar': 42}
3941
assert spec.environment['foo'] == 'biz'
4042
assert spec.environment['bar'] == '42'
4143

0 commit comments

Comments
 (0)