@@ -58,15 +58,14 @@ Reference
5858 :raises InvalidMarker: If the given ``markers `` are not parseable, then
5959 this exception will be raised.
6060
61- .. method :: evaluate(environment=None)
61+ .. method :: evaluate(environment=None, context='metadata' )
6262
6363 Evaluate the marker given the context of the current Python process.
6464
6565 :param dict environment: A dictionary containing keys and values to
6666 override the detected environment.
67- :param str context: A string representing the context in which the marker is evaluated.
68- Acceptable values are "metadata" (for core metadata; default),
69- "lock_file", and "requirement" (i.e. all other situations).
67+ :param EvaluateContext context: A string representing the context in which
68+ the marker is evaluated.
7069 :raises: UndefinedComparison: If the marker uses a comparison on strings
7170 which are not valid versions per the
7271 :ref: `specification of version specifiers
@@ -81,6 +80,14 @@ Reference
8180 A dictionary that represents a Python environment as captured by
8281 :func: `default_environment `.
8382
83+ .. py :data :: packaging.markers.EvaluateContext
84+
85+ A ``typing.Literal `` enumerating valid values for the ``context `` passed to ``Marker.evaluate ``, namely:
86+
87+ * "metadata" (for core metadata; default)
88+ * "lock_file" (for lock files)
89+ * "requirement" (i.e. all other situations)
90+
8491.. function :: default_environment()
8592
8693 Returns a dictionary representing the current Python process. This is the
0 commit comments