Skip to content

Commit c575c15

Browse files
committed
Clarify language in directives regarding named attribute usage in version comparisons.
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
1 parent 24113f2 commit c575c15

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/spec/directives.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ Type checkers should support the following comparison patterns:
168168
* ``sys.version_info < <2-tuple>``
169169

170170
Comparisons checks are only supported against the first two elements of the version tuple.
171-
Use of named attributes is not supported.
171+
Use of named attributes is not mandated.
172172

173173
.. code-block:: python
174174
:caption: Example `sys.version_info`
@@ -235,7 +235,7 @@ Type checkers should support the following comparison patterns:
235235
* ``sys.implementation.version < <2-tuple>``
236236

237237
Comparisons checks are only supported against the first two elements of the implementation version tuple.
238-
Use of named attributes is not supported.
238+
Use of named attributes is not mandated.
239239

240240
.. code-block:: python
241241
:caption: Example `sys.implementation.version`
@@ -257,7 +257,7 @@ No support for complex expressions
257257
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
258258

259259
Type checkers are only required to support the above patterns, and are not required to evaluate complex expressions involving these variables.
260-
For example, the pattern ``sys.platform == "linux"`` is supported but other syntax variants such as ``platform == "linux"`` and ``"win" not in sys.platform`` are not supported.
260+
For example, the pattern ``sys.platform == "linux"`` is supported but other syntax variants such as ``platform == "linux"`` and ``"win" not in sys.platform`` are not mandated.
261261

262262
Therefore checkers are **not required** to understand obfuscations such as:
263263

0 commit comments

Comments
 (0)