From d3efc5466684ceb404429b762d71bcb9090a76d8 Mon Sep 17 00:00:00 2001 From: David Seddon Date: Thu, 29 Aug 2024 18:10:43 +0100 Subject: [PATCH] Tweak wording of wildcard docs --- docs/contract_types.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/contract_types.rst b/docs/contract_types.rst index 537b083..075384a 100644 --- a/docs/contract_types.rst +++ b/docs/contract_types.rst @@ -2,6 +2,9 @@ Contract types ============== + +.. _forbidden modules: + Forbidden modules ----------------- @@ -337,6 +340,9 @@ Options used by multiple contracts Wildcards are supported. ``*`` stands in for a module name, without including subpackages. ``**`` includes subpackages too. + Note that this wildcard format is only supported for the ``ignore_imports`` fields. It can't currently be used for + other fields, such as in the ``source_modules`` field of a :ref:`forbidden modules` contract. + Examples: - ``mypackage.*``: matches ``mypackage.foo`` but not ``mypackage.foo.bar``. @@ -352,5 +358,3 @@ Options used by multiple contracts - ``error``: Error if there are any unmatched expressions (default). - ``warn``: Print a warning for each unmatched expression. - ``none``: Do not alert. - -Note that wildcards are ONLY implemented for ``ignore_imports`` and won't work in contracts.