Skip to content

Commit 2c4e700

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 33c4477 commit 2c4e700

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs/spec/directives.rst

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

179179
Comparisons checks are only supported against the first two elements of the version tuple.
180-
Use of named attributes is not supported.
180+
Use of named attributes is not mandated.
181181

182182
.. code-block:: python
183183
:caption: Example `sys.version_info`
@@ -244,7 +244,7 @@ Type checkers should support the following comparison patterns:
244244
* ``sys.implementation.version < <2-tuple>``
245245

246246
Comparisons checks are only supported against the first two elements of the implementation version tuple.
247-
Use of named attributes is not supported.
247+
Use of named attributes is not mandated.
248248

249249
.. code-block:: python
250250
:caption: Example `sys.implementation.version`
@@ -266,7 +266,7 @@ No support for complex expressions
266266
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
267267

268268
Type checkers are only required to support the above patterns, and are not required to evaluate complex expressions involving these variables.
269-
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.
269+
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.
270270

271271
Therefore checkers are **not required** to understand obfuscations such as:
272272

0 commit comments

Comments
 (0)