Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate PEP created dates and update linters #1886

Merged
merged 3 commits into from
Mar 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ensure files are always checked in with consistent line endings
* text eol=lf
24 changes: 12 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
pep-0000.txt
pep-0000.rst
pep-????.html
peps.rss
__pycache__
*.pyc
*.pyo
*~
*env
.vscode
*.swp
/build
pep-0000.txt
pep-0000.rst
pep-????.html
peps.rss
__pycache__
*.pyc
*.pyo
*~
*env
.vscode
*.swp
/build
30 changes: 29 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: mixed-line-ending
name: Normalize mixed line endings
args: [--fix=lf]

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.7.1
rev: v1.8.0
hooks:
- id: rst-backticks
- id: rst-inline-touching-normal
files: '^pep-\d+\.txt|\.rst$'
types: [text]
- id: rst-directive-colons
files: '^pep-\d+\.txt|\.rst$'
types: [text]

- repo: local
hooks:
- id: check-created-exists
name: "Check all PEPs have created date"
language: pygrep
entry: '^Created:'
args: ['--negate']
files: '^pep-\d+\.(rst|txt)$'
types: [text]
- id: validate-created
name: "Validate created dates"
language: pygrep
entry: '^Created:(?:(?! +([0-2][0-9]|(3[01]))-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(199[0-9]|20[0-9][0-9])( \(|$)))'
files: '^pep-\d+\.(rst|txt)$'
types: [text]
2 changes: 1 addition & 1 deletion pep-0540.txt
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ If stdin and/or stdout is redirected to a pipe, ``sys.stdin`` and/or
But in UTF-8 Mode, ``sys.stdin`` and ``sys.stdout`` always use the UTF-8
encoding.

.. note:
.. note::
There is no POSIX locale on Windows. The ANSI code page is used as
the locale encoding, and this code page never uses the ASCII
encoding.
Expand Down
Loading