Make syntax highlighting explicit in docs

This commit is contained in:
Dion Moult
2023-01-10 10:16:28 +11:00
parent 66e067d1ce
commit c8ba96cde8
236 changed files with 753 additions and 251 deletions
@@ -45,7 +45,9 @@ class Usecase:
:return: The new IfcContextDependentUnit
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Boxes of things
ifcopenshell.api.run("unit.add_context_dependent_unit", model, name="BOXES")
@@ -46,7 +46,9 @@ class Usecase:
IfcConversionBasedUnitWithOffset
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Some common imperial measurements
length = ifcopenshell.api.run("unit.add_conversion_based_unit", model, name="inch")
@@ -30,7 +30,9 @@ class Usecase:
:return: The newly created IfcMonetaryUnit
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# If you do all your cost plans in Zimbabwean dollars then nobody
# knows how accurate the numbers are.
@@ -45,7 +45,9 @@ class Usecase:
:return: The newly created IfcSIUnit
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Millimeters and square meters
length = ifcopenshell.api.run("unit.add_si_unit", model, unit_type="LENGTHUNIT", prefix="MILLI")
@@ -40,7 +40,9 @@ class Usecase:
:return: The IfcUnitAssignment element
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# You need a project before you can assign units.
ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcProject")
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# If you do all your cost plans in Zimbabwean dollars then nobody
# knows how accurate the numbers are.
@@ -34,7 +34,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Boxes of things
unit = ifcopenshell.api.run("unit.add_context_dependent_unit", model, name="BOXES")
@@ -32,7 +32,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# What?
unit = ifcopenshell.api.run("unit.add_context_dependent_unit", model, name="HANDFULS")
@@ -26,7 +26,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# You need a project before you can assign units.
ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcProject")