Skip to content

Commit 9fc83ba

Browse files
committed
linting, disable typeguard on type specific tests
1 parent 392cc35 commit 9fc83ba

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/psij/job_attributes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ def __init__(self, duration: timedelta = timedelta(minutes=10),
4343
4444
All constructor parameters are accessible as properties.
4545
"""
46-
4746
self.duration = duration
4847
self.queue_name = queue_name
4948
self.project_name = project_name

src/psij/job_spec.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ def __init__(self, executable: Optional[str] = None, arguments: Optional[List[st
130130
the scheduler. In such a case, one must leave the `spec.directory` attribute empty and
131131
refer to files inside the job directory using relative paths.
132132
"""
133-
134133
self._name = name
135134
self.executable = executable
136135
self.arguments = arguments

tests/test_job_spec.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import os
22
from pathlib import Path
33

4+
from typeguard import suppress_type_checks
5+
46
import pytest
57

68
from psij import Job, JobExecutor, JobSpec
@@ -13,8 +15,9 @@ def _test_spec(spec: JobSpec) -> None:
1315

1416
def test_environment_types() -> None:
1517

16-
with pytest.raises(TypeError):
17-
_test_spec(JobSpec(executable='true', environment={1: 'foo'})) # type: ignore
18+
with suppress_type_checks():
19+
with pytest.raises(TypeError):
20+
_test_spec(JobSpec(executable='true', environment={1: 'foo'})) # type: ignore
1821

1922
with pytest.raises(TypeError):
2023
spec = JobSpec(executable='true')

0 commit comments

Comments
 (0)