Skip to content

Commit 3e6baee

Browse files
committed
Fix doctest problems
1 parent 273ef6c commit 3e6baee

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/scippneutron/meta/_model.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,16 @@ class Beamline(BaseModel):
2121
The location of the beamline is split into ``facility`` and ``site``, where
2222
a 'facility' is located at a 'site'. For example:
2323
24-
>>> Beamline(
24+
>>> from scippneutron.meta import Beamline
25+
>>> beamline = Beamline(
2526
... name='Amor',
2627
... facility='SINQ',
2728
... site='PSI',
2829
... )
2930
3031
If there is no separate facility and site, omit ``site``:
3132
32-
>>> Beamline(
33+
>>> beamline = Beamline(
3334
... name='ESTIA',
3435
... facility='ESS',
3536
... site=None, # can be omitted
@@ -196,7 +197,8 @@ class Software(BaseModel):
196197
The piece of software should be specified as precisely as possible.
197198
For example, a release version of ScippNeutron could be specified as follows:
198199
199-
>>> Software(
200+
>>> from scippneutron.meta import Software
201+
>>> software = Software(
200202
... name='ScippNeutron',
201203
... version='24.11.0',
202204
... url='https://github.com/scipp/scippneutron/releases/tag/24.11.0',
@@ -208,7 +210,7 @@ class Software(BaseModel):
208210
But the software should be specified as precisely as possible.
209211
For example:
210212
211-
>>> Software(
213+
>>> software = Software(
212214
... name='ScippNeutron',
213215
... version='24.11.1.dev8+g10d09ab0',
214216
... url='https://github.com/scipp/scippneutron',

0 commit comments

Comments
 (0)