@@ -73,6 +73,9 @@ cdef class JobSubmitDescription:
7373
7474 slurm_init_job_desc_msg(self .ptr)
7575
76+ def __repr__ (self ):
77+ return f' pyslurm.{self.__class__.__name__}'
78+
7679 def submit (self ):
7780 """ Submit a batch job description.
7881
@@ -87,9 +90,12 @@ cdef class JobSubmitDescription:
8790 >>> desc = pyslurm.JobSubmitDescription(
8891 ... name="test-job",
8992 ... cpus_per_task=1,
90- ... time_limit="10-00:00:00")
93+ ... time_limit="10-00:00:00",
94+ ... script="/path/to/your/submit_script.sh")
9195 >>>
9296 >>> job_id = desc.submit()
97+ >>> print(job_id)
98+ 99
9399 """
94100 cdef submit_response_msg_t * resp = NULL
95101
@@ -112,9 +118,9 @@ cdef class JobSubmitDescription:
112118
113119 Args:
114120 overwrite (bool):
115- If set to True, the value from an option found in the
121+ If set to ` True` , the value from an option found in the
116122 environment will override the current value of the attribute
117- in this instance. Default is False
123+ in this instance. Default is ` False`
118124
119125 Examples:
120126 Lets consider you want to set the name of the Job, its Account
@@ -141,13 +147,13 @@ cdef class JobSubmitDescription:
141147 self ._parse_env(overwrite)
142148
143149 def load_sbatch_options (self , overwrite = False ):
144- """ Load values from #SBATCH options in the batch script.
150+ """ Load values from ` #SBATCH` options in the batch script.
145151
146152 Args:
147153 overwrite (bool):
148- If set to True, the value from an option found in the in the
154+ If set to ` True` , the value from an option found in the in the
149155 batch script will override the current value of the attribute
150- in this instance. Default is False
156+ in this instance. Default is ` False`
151157 """
152158 if not self .script:
153159 raise ValueError (" You need to set the 'script' attribute first." )
0 commit comments