Skip to content

Commit f9df562

Browse files
committed
DOC: update the "sharp bits" section, mention nested data structures
1 parent 0269eea commit f9df562

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ however the need usually indicates an issue with the package itself.
345345
#### _Optional dependencies are not that optional_
346346

347347
If your package contains optional dependencies, doctests do not know about them
348-
being optional. So you either guard the imports in doctests (yikes!), or
348+
being optional. So you either guard the imports in doctests themselves (yikes!), or
349349
the collections fails if dependencies are not available.
350350

351351
The solution is to explicitly `--ignore` the paths to modules with optionals.
@@ -371,17 +371,17 @@ objects will be collected.
371371

372372
The decision on what is public is as follows: an object is public iff
373373

374-
- it is included into the `__all__` list of a public module;
375-
- the name of the object does not have a leading underscore;
376-
- the name of the module from which the object is collected does not have
374+
- it is included into the `__all__` list of a public module;
375+
- the name of the object does not have a leading underscore;
376+
- the name of the module from which the object is collected does not have
377377
a leading underscore.
378378

379379
Consider an example: `scipy.linalg.det` is defined in `scipy/linalg/_basic.py`,
380380
so it is collected twice, from `_basic.py` and from `__init__.py`. The rule above
381381
leads to
382382

383-
- `scipy.linalg._basic.det`, collected from `scipy/linalg/_basic.py`, is private.
384-
- `scipy.linalg.det`, collected from `scipy/linalg/__init__.py`, is public.
383+
- `scipy.linalg._basic.det`, collected from `scipy/linalg/_basic.py`, is private.
384+
- `scipy.linalg.det`, collected from `scipy/linalg/__init__.py`, is public.
385385

386386
#### _`pytest`'s assertion rewriting_
387387

@@ -398,7 +398,7 @@ adding `--assert=plain` is reasonable.
398398
#### _Mixing strings and numbers_
399399

400400
Generally, we aim to handle mixtures of strings and numeric data. Deeply nested data
401-
structures however may cause the checker to fall back to the vanilla `doctest` literal
401+
structures, however, may cause the checker to fall back to the vanilla `doctest` literal
402402
checking. For instance, `["value", 1/3]` will use the floating-point aware checker, and
403403
so will `{"value": 1/3, "other value": 2/3}` or `[(1, 2), (3, 4)]`; Meanwhile, nested
404404
dictionaries, `{"a": dict(value=1/3)}`, or lists of tuples with mixed entries,

0 commit comments

Comments
 (0)