Commit Graph

17 Commits

Author SHA1 Message Date
xzmeng 946fa15e8b
PEP 649, 652, 653, 665, 684, 690, 713, 727: Correct spelling (#3313) 2023-08-31 03:16:35 +00:00
Oleg Iarygin b9ca714a43
Lint: Fix outstanding codespell spelling errors (#3129)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: wookie184 <wookie1840@gmail.com>
2023-05-01 13:00:36 -06:00
Hugo van Kemenade 7fa80c34d7
Infra + many PEPs: Add Sphinx Lint and fix errors (#2816)
* PEP 555, 653: Fix inline literal missing (escaped) space after literal

* Add newline at end of file

* PEP 692: Add newline at end of file

* PEP 633: Fix missing space before role

* Run sphinx-lint in pre-commit

* PEP 639: Remove rogue backticks

* PEP 372: Remove rogue backticks

* PEP 462: Add missing underscore after closing backtick in hyperlink

* PEP 481: Add missing underscore after closing backtick in hyperlinks

* PEP 507: Add missing underscore after closing backtick in hyperlinks

* PEP 453: Add missing underscore after closing backtick in hyperlinks, and convert to links

* PEP 534: Fix inline literal missing (escaped) space after literal

* PEP 372, 453, 462: Redirect BPO to GH
2022-10-06 12:14:32 -07:00
Adam Turner 113e490701
Several PEPs: Use explicit `:pep:` and `:rfc:` roles (#2209) 2022-01-21 11:03:51 +00:00
Dimitri Papadopoulos Orfanos 57d9baf04d
Typos found by codespell (#2073)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2021-09-17 11:18:24 -07:00
Mark Shannon 4134c46262
Simplifications of PEP 653: (#1919)
* Make 0 the defualt for __match_class__ and drop ability to not match class patterns

* Use equality not bitwise ands to check for matches

* Add to rejected and deferred sections, explaining the above
2021-04-12 12:17:50 +01:00
Mark Shannon c029c02e36
PEP 653: Fix example. Use get(key, sentinel) instead of __getitem__(key) for mappings. (#1902) 2021-03-30 23:30:43 +01:00
Mark Shannon 0a0e7a3045
PEP 653: Split __match_kind__ into __match_container__ and __match_class__ (#1901) 2021-03-30 11:47:14 +01:00
Mark Shannon 59b39a6dd0
PEP 653: Delete out-of-date note and correct tests in mapping pattern translations. (#1895) 2021-03-27 18:17:04 +00:00
Mark Shannon 3686181865
PEP 653: Remove MATCH_POSITIONAL and make semantics for MATCH_DEFAULT near identical to PEP 634. (#1893)
* Use class in pattern for matching, rather than subject.

* Remove temporary dict when matching mapping patterns.

* Remove MATCH_POSITIONAL.
2021-03-27 12:14:48 +00:00
CAM Gerlach e6fb0d8ca6
Validate PEP created dates and update linters (#1886)
* Check created date exists & matches format, and fix non-conforming

* Automatically fix mixed EoLs on checkin and in one PEP

* Add rst-directive-colons check, fix issue it found and refine regex
2021-03-22 12:29:08 -07:00
Mark Shannon 54a16d60ef
Don't special case named tuples. The default behavior is fine. (#1874) 2021-03-16 11:15:21 +00:00
Mark Shannon 3cc86339d2
PEP 653: Change semantics to be closer to PEP 634, while keeping the important features of PEP 653. (#1868)
* Change name of `MATCH_CLASS` to `MATCH_POSITIONAL`.
* Drop `__attributes__` and use `__match_args__` instead.
  * For `MATCH_DEFAULT`, `__match_args__` acts a map from positions to names.
   * For `MATCH_POSITIONAL`, `__match_args__` acts a map from names to positions.
* Change semantics of `MATCH_DEFAULT` when match class patterns to those of PEP 634.
* Update translations.
* Further expand examples
2021-03-12 18:01:08 +00:00
Mark Shannon 2aec45c8b8
PEP 653: Rephrase translations in terms of failure, rather than success, to make them easier to compose. (#1865) 2021-03-10 15:22:07 +00:00
Mark Shannon c8f7f9cd7c
PEP 653: Make it clearer that MATCH_DEFAULT is the default. (#1823) 2021-02-19 18:55:47 +00:00
Mark Shannon 89183f61d1
Clarify description of __match_kind__. Drop claims of improved security (#1822) 2021-02-19 17:56:52 +00:00
Mark Shannon aeab09a58f
PEP 653: Precise Semantics for Pattern Matching (#1819) 2021-02-18 15:08:53 +00:00