Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ffa4d19

Browse filesBrowse files
hugovkAlexWaygood
authored andcommitted
Trim trailing whitespace and test on CI (python#104275)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
1 parent 013469f commit ffa4d19
Copy full SHA for ffa4d19

File tree

13 files changed

+44
-12
lines changed
Filter options

13 files changed

+44
-12
lines changed

‎.github/CODEOWNERS

Copy file name to clipboardExpand all lines: .github/CODEOWNERS
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
# GitHub
88
.github/** @ezio-melotti @hugovk
99

10+
# pre-commit
11+
.pre-commit-config.yaml @hugovk @AlexWaygood
12+
1013
# Build system
1114
configure* @erlend-aasland @corona10
1215

‎.github/workflows/lint.yml

Copy file name to clipboard
+22Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Lint
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
permissions:
6+
contents: read
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 10
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- uses: actions/setup-python@v4
20+
with:
21+
python-version: "3.x"
22+
- uses: pre-commit/action@v3.0.0

‎.pre-commit-config.yaml

Copy file name to clipboard
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: check-yaml
6+
- id: trailing-whitespace
7+
types_or: [c, python, rst]

‎Modules/_blake2/blake2module.h

Copy file name to clipboardExpand all lines: Modules/_blake2/blake2module.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@
3838
#endif // HAVE_LIBB2
3939

4040
// for secure_zero_memory(), store32(), store48(), and store64()
41-
#include "impl/blake2-impl.h"
41+
#include "impl/blake2-impl.h"
4242

4343
#endif // Py_BLAKE2MODULE_H

‎Modules/_blake2/impl/blake2b-round.h

Copy file name to clipboardExpand all lines: Modules/_blake2/impl/blake2b-round.h
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
\
6363
row2l = _mm_roti_epi64(row2l, -24); \
6464
row2h = _mm_roti_epi64(row2h, -24); \
65-
65+
6666
#define G2(row1l,row2l,row3l,row4l,row1h,row2h,row3h,row4h,b0,b1) \
6767
row1l = _mm_add_epi64(_mm_add_epi64(row1l, b0), row2l); \
6868
row1h = _mm_add_epi64(_mm_add_epi64(row1h, b1), row2h); \
@@ -81,7 +81,7 @@
8181
\
8282
row2l = _mm_roti_epi64(row2l, -63); \
8383
row2h = _mm_roti_epi64(row2h, -63); \
84-
84+
8585
#if defined(HAVE_SSSE3)
8686
#define DIAGONALIZE(row1l,row2l,row3l,row4l,row1h,row2h,row3h,row4h) \
8787
t0 = _mm_alignr_epi8(row2h, row2l, 8); \

‎Modules/_blake2/impl/blake2s-load-xop.h

Copy file name to clipboardExpand all lines: Modules/_blake2/impl/blake2s-load-xop.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ buf = _mm_perm_epi8(t1, m3, _mm_set_epi32(TOB(3),TOB(2),TOB(1),TOB(7)) );
166166
#define LOAD_MSG_8_3(buf) \
167167
t0 = _mm_perm_epi8(m0, m2, _mm_set_epi32(TOB(6),TOB(1),TOB(0),TOB(0)) ); \
168168
buf = _mm_perm_epi8(t0, m3, _mm_set_epi32(TOB(3),TOB(2),TOB(5),TOB(4)) ); \
169-
169+
170170
#define LOAD_MSG_8_4(buf) \
171171
buf = _mm_perm_epi8(m0, m1, _mm_set_epi32(TOB(5),TOB(4),TOB(7),TOB(2)) );
172172

‎Modules/_blake2/impl/blake2s-round.h

Copy file name to clipboardExpand all lines: Modules/_blake2/impl/blake2s-round.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,6 @@
8686
LOAD_MSG_ ##r ##_4(buf4); \
8787
G2(row1,row2,row3,row4,buf4); \
8888
UNDIAGONALIZE(row1,row2,row3,row4); \
89-
89+
9090
#endif
9191

‎Modules/_ctypes/_ctypes_test.c

Copy file name to clipboardExpand all lines: Modules/_ctypes/_ctypes_test.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,7 @@ EXPORT (HRESULT) KeepObject(IUnknown *punk)
10361036

10371037
#ifdef MS_WIN32
10381038

1039-
// i38748: c stub for testing stack corruption
1039+
// i38748: c stub for testing stack corruption
10401040
// When executing a Python callback with a long and a long long
10411041

10421042
typedef long(__stdcall *_test_i38748_funcType)(long, long long);

‎Modules/_testcapi/immortal.c

Copy file name to clipboardExpand all lines: Modules/_testcapi/immortal.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "parts.h"
22

3-
int verify_immortality(PyObject *object)
3+
int verify_immortality(PyObject *object)
44
{
55
assert(_Py_IsImmortal(object));
66
Py_ssize_t old_count = Py_REFCNT(object);

‎Modules/termios.c

Copy file name to clipboardExpand all lines: Modules/termios.c
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ termios_tcgetattr_impl(PyObject *module, int fd)
8585
int r;
8686

8787
Py_BEGIN_ALLOW_THREADS
88-
r = tcgetattr(fd, &mode);
88+
r = tcgetattr(fd, &mode);
8989
Py_END_ALLOW_THREADS
9090
if (r == -1) {
9191
return PyErr_SetFromErrno(state->TermiosError);
@@ -372,7 +372,7 @@ termios_tcgetwinsize_impl(PyObject *module, int fd)
372372
#if defined(TIOCGWINSZ)
373373
termiosmodulestate *state = PyModule_GetState(module);
374374
struct winsize w;
375-
int r;
375+
int r;
376376

377377
Py_BEGIN_ALLOW_THREADS
378378
r = ioctl(fd, TIOCGWINSZ, &w);

‎Parser/tokenizer.c

Copy file name to clipboardExpand all lines: Parser/tokenizer.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static inline tokenizer_mode* TOK_GET_MODE(struct tok_state* tok) {
4848
}
4949
static inline tokenizer_mode* TOK_NEXT_MODE(struct tok_state* tok) {
5050
assert(tok->tok_mode_stack_index >= 0);
51-
assert(tok->tok_mode_stack_index + 1 < MAXFSTRINGLEVEL);
51+
assert(tok->tok_mode_stack_index + 1 < MAXFSTRINGLEVEL);
5252
return &(tok->tok_mode_stack[++tok->tok_mode_stack_index]);
5353
}
5454
#else

‎Tools/msi/bundle/bootstrap/pch.h

Copy file name to clipboardExpand all lines: Tools/msi/bundle/bootstrap/pch.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// The license and further copyright text can be found in the file
66
// LICENSE.TXT at the root directory of the distribution.
77
// </copyright>
8-
//
8+
//
99
// <summary>
1010
// Precompiled header for standard bootstrapper application.
1111
// </summary>

‎Tools/msi/bundle/bootstrap/resource.h

Copy file name to clipboardExpand all lines: Tools/msi/bundle/bootstrap/resource.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
// Next default values for new objects
17-
//
17+
//
1818
#ifdef APSTUDIO_INVOKED
1919
#ifndef APSTUDIO_READONLY_SYMBOLS
2020
#define _APS_NEXT_RESOURCE_VALUE 102

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.