Skip to content

Commit be84cde

Browse files
authored
Use default_options as a dictionary in reference too (#882)
1 parent c0d870e commit be84cde

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

reference/conanfile/attributes.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -349,15 +349,15 @@ consistent implementation take into account these considerations:
349349
- equals ``False`` for the values ``False``, ``"False"`` and ``"false"``, also for the empty
350350
string and for ``0`` and ``"0"`` as expected.
351351

352-
- Comparaison using ``is`` is always equals to ``False`` because the types would be different as
352+
- Comparison using ``is`` is always equals to ``False`` because the types would be different as
353353
the option value is encapsulated inside a Conan class.
354354

355-
- Explicit comparaisons with the ``==`` symbol **are case sensitive**, so:
355+
- Explicit comparisons with the ``==`` symbol **are case sensitive**, so:
356356

357357
- ``self.options.option = "False"`` satisfies ``assert self.options.option == False``,
358358
``assert self.options.option == "False"``, but ``assert self.options.option != "false"``.
359359

360-
- A different behaviour has ``self.options.option = None``, because
360+
- A different behavior has ``self.options.option = None``, because
361361
``assert self.options.option != None``.
362362

363363

@@ -366,21 +366,21 @@ consistent implementation take into account these considerations:
366366
default_options
367367
---------------
368368

369-
As you have seen in the examples above, recipe's default options can be assigned to the desired value. However, you can also specify
370-
default option values of the required dependencies:
369+
As you have seen in the examples above, recipe's default options are declared as a dictionary and can be assigned an initial desired value.
370+
However, you can also specify default option values of the required dependencies:
371371

372372
.. code-block:: python
373373
374374
class OtherPkg(ConanFile):
375375
requires = "Pkg/0.1@user/channel"
376-
default_options = "Pkg:pkg_option=value"
376+
default_options = {"Pkg:pkg_option": "value"}
377377
378378
And it also works with default option values of conditional required dependencies:
379379

380380
.. code-block:: python
381381
382382
class OtherPkg(ConanFile):
383-
default_options = "Pkg:pkg_option=value"
383+
default_options = {"Pkg:pkg_option": "value"}
384384
385385
def requirements(self):
386386
if self.settings.os != "Windows":

0 commit comments

Comments
 (0)