Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/5] [pre-commit] Some pre-commit improvements
@ 2026-07-20 12:50 Tom de Vries
  2026-07-20 12:50 ` [PATCH 1/5] [gdb] Fix bare except in gdb/gdb-gdb.py.in Tom de Vries
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Tom de Vries @ 2026-07-20 12:50 UTC (permalink / raw)
  To: gdb-patches

This patch series contains some pre-commit improvements.

The third patch fixes the problem that flake8 is not run for gdb/gdb-gdb.py.in.

The first and second patch fix flake8 problems in gdb/gdb-gdb.py.in.

The fourth and fifth patch makes pre-commit rely less on types filtering,
fixing PR build/34411.

Tested on x86_64-linux.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34411

Tom de Vries (5):
  [gdb] Fix bare except in gdb/gdb-gdb.py.in
  [gdb] Remove superfluous global in gdb/gdb-gdb.py.in
  [pre-commit] Run flake8 for gdb/gdb-gdb.py.in
  [pre-commit] Don't require text type for check-whitespace hook
  [pre-commit] Don't require text type for codespell hook

 .pre-commit-config.yaml      | 25 ++++++++++++++++++++-----
 gdb/doc/.gitattributes       | 10 ++++++++++
 gdb/gdb-gdb.py.in            |  3 +--
 gdb/testsuite/.gitattributes |  4 ++++
 4 files changed, 35 insertions(+), 7 deletions(-)
 create mode 100644 gdb/doc/.gitattributes
 create mode 100644 gdb/testsuite/.gitattributes


base-commit: cef1fbf3b02ff6e5bc62e1b8a7d30c0a32b8b9f7
-- 
2.51.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/5] [gdb] Fix bare except in gdb/gdb-gdb.py.in
  2026-07-20 12:50 [PATCH 0/5] [pre-commit] Some pre-commit improvements Tom de Vries
@ 2026-07-20 12:50 ` Tom de Vries
  2026-07-20 12:50 ` [PATCH 2/5] [gdb] Remove superfluous global " Tom de Vries
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Tom de Vries @ 2026-07-20 12:50 UTC (permalink / raw)
  To: gdb-patches

Fix the following flake8 error:
...
gdb/gdb-gdb.py.in:97:9: E722 do not use bare 'except'
...

The problem is that bare except catches all exceptions, also SystemExit and
KeyboardInterrupt.

Fix this by using 'except Exception'.
---
 gdb/gdb-gdb.py.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/gdb-gdb.py.in b/gdb/gdb-gdb.py.in
index 417b6492db5..8ed8169afa2 100644
--- a/gdb/gdb-gdb.py.in
+++ b/gdb/gdb-gdb.py.in
@@ -94,7 +94,7 @@ class TypeFlagsPrinter:
         TYPE_FLAGS = []
         try:
             iflags = gdb.lookup_type("enum type_instance_flag_value")
-        except:
+        except Exception:
             print("Warning: Cannot find enum type_instance_flag_value type.")
             print("         `struct type' pretty-printer will be degraded")
             return
-- 
2.51.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 2/5] [gdb] Remove superfluous global in gdb/gdb-gdb.py.in
  2026-07-20 12:50 [PATCH 0/5] [pre-commit] Some pre-commit improvements Tom de Vries
  2026-07-20 12:50 ` [PATCH 1/5] [gdb] Fix bare except in gdb/gdb-gdb.py.in Tom de Vries
@ 2026-07-20 12:50 ` Tom de Vries
  2026-07-20 12:50 ` [PATCH 3/5] [pre-commit] Run flake8 for gdb/gdb-gdb.py.in Tom de Vries
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Tom de Vries @ 2026-07-20 12:50 UTC (permalink / raw)
  To: gdb-patches

Fix the following flake8 error:
...
gdb/gdb-gdb.py.in:71:9: F824 `global TYPE_FLAGS` is unused: \
  name is never assigned in scope
...
by removing the superfluous global statement.
---
 gdb/gdb-gdb.py.in | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gdb/gdb-gdb.py.in b/gdb/gdb-gdb.py.in
index 8ed8169afa2..e1db0a594bb 100644
--- a/gdb/gdb-gdb.py.in
+++ b/gdb/gdb-gdb.py.in
@@ -68,7 +68,6 @@ class TypeFlagsPrinter:
         self.val = val
 
     def __str__(self):
-        global TYPE_FLAGS
         if TYPE_FLAGS is None:
             self.init_TYPE_FLAGS()
         if not self.val:
-- 
2.51.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 3/5] [pre-commit] Run flake8 for gdb/gdb-gdb.py.in
  2026-07-20 12:50 [PATCH 0/5] [pre-commit] Some pre-commit improvements Tom de Vries
  2026-07-20 12:50 ` [PATCH 1/5] [gdb] Fix bare except in gdb/gdb-gdb.py.in Tom de Vries
  2026-07-20 12:50 ` [PATCH 2/5] [gdb] Remove superfluous global " Tom de Vries
@ 2026-07-20 12:50 ` Tom de Vries
  2026-08-12 18:15   ` Simon Marchi
  2026-07-20 12:50 ` [PATCH 4/5] [pre-commit] Don't require text type for check-whitespace hook Tom de Vries
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 12+ messages in thread
From: Tom de Vries @ 2026-07-20 12:50 UTC (permalink / raw)
  To: gdb-patches

When running the pre-commit hooks for gdb/gdb-gdb.py.in:
...
$ pre-commit run --files gdb/gdb-gdb.py.in
black...................................................................Passed
flake8..............................................(no files to check)Skipped
isort...................................................................Passed
codespell...............................................................Passed
tclint..............................................(no files to check)Skipped
check-include-guards................................(no files to check)Skipped
check-gnu-style.....................................(no files to check)Skipped
- hook id: check-gnu-style
check-whitespace........................................................Passed
pre-commit-setup........................................................Passed
check-file-mode.........................................................Passed
...
we see that flake8 is skipped.

The hook setup has a types_or workaround that's supposed to prevent this:
...
    - id: flake8
      types_or: *gdb_python_types
      files: *gdb_python_files
      args: [--config, gdb/setup.cfg]
...
but that doesn't work because flake8's .pre-commit-hooks.yaml doesn't set
types_or, but types:
...
    types: [python]
...

So we end up with an effective setting of both types and types_or:
...
    types: [python]
    types_or: [file]
...
which both have to be matched, and because gdb/gdb-gdb.py.in doesn't match
python:
...
$ identify-cli gdb/gdb-gdb.py.in
["file", "non-executable", "text"]
...
the file is skipped.

This could be fixed by:
...
-    types_or: [file]
+    types: [file]
...
but an isort update setting types_or could reintroduce the same problem.

For robustness, fix this by setting both types and types_or for each python
hook.

Using the same value for both settings would work:
...
    types: [file]
    types_or: [file]
...
because types and types_or have the same effect for list lengths 0 and 1.

But I think it's better to have different anchors to avoid any confusion about
the and/or behavior, in which case it's more natural to use the actual default
[] for types_or, and to update the anchor names to reflect that these are the
default values:
...
    types: &types_default [file]
    types_or: &types_or_default []
...
---
 .pre-commit-config.yaml | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 60164e446fc..b437593b228 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -53,26 +53,33 @@ repos:
   #  - gdb/testsuite/*.py
   #
   # Because gdb/gdb-gdb.py.in is not classified as python, we use
-  # 'types_or: [file]' to override the default type for these hooks.
+  # 'types: [file] / types_or: []' to override the default settings for these
+  # hooks.
+  #
+  # To be robust we set both types and types_or for each hook.  Typically a
+  # repo sets only one of these, but that may change with any update.
   #
   - repo: https://github.com/psf/black-pre-commit-mirror
     rev: 26.5.1
     hooks:
     - id: black
-      types_or: &gdb_python_types [file]
+      types: &types_default [file]
+      types_or: &types_or_default []
       files: &gdb_python_files '^gdb/.*\.py(\.in)?$'
   - repo:  https://github.com/pycqa/flake8
     rev: 7.3.0
     hooks:
     - id: flake8
-      types_or: *gdb_python_types
+      types: *types_default
+      types_or: *types_or_default
       files: *gdb_python_files
       args: [--config, gdb/setup.cfg]
   - repo: https://github.com/pycqa/isort
     rev: 9.0.0b1
     hooks:
     - id: isort
-      types_or: *gdb_python_types
+      types: *types_default
+      types_or: *types_or_default
       files: *gdb_python_files
       # Isort's .pre-commit-hooks.yaml sets stages, overriding default_stages,
       # so this hook needs an explicit setting.
-- 
2.51.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 4/5] [pre-commit] Don't require text type for check-whitespace hook
  2026-07-20 12:50 [PATCH 0/5] [pre-commit] Some pre-commit improvements Tom de Vries
                   ` (2 preceding siblings ...)
  2026-07-20 12:50 ` [PATCH 3/5] [pre-commit] Run flake8 for gdb/gdb-gdb.py.in Tom de Vries
@ 2026-07-20 12:50 ` Tom de Vries
  2026-07-20 12:50 ` [PATCH 5/5] [pre-commit] Don't require text type for codespell hook Tom de Vries
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Tom de Vries @ 2026-07-20 12:50 UTC (permalink / raw)
  To: gdb-patches

The check-whitespace hook has a line:
...
types: ['text']
...

Drop this, to make the check-whitespace hook see the same files as git usage
outside pre-commit:
...
$ git diff-index --cached --check $(git hash-object -t tree /dev/null) gdb*
...

Instead, add .gitattributes files in gdb/doc and gdb/testsuite.

https://sourceware.org/bugzilla/show_bug.cgi?id=34411
---
 .pre-commit-config.yaml      |  5 ++++-
 gdb/doc/.gitattributes       | 10 ++++++++++
 gdb/testsuite/.gitattributes |  4 ++++
 3 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 gdb/doc/.gitattributes
 create mode 100644 gdb/testsuite/.gitattributes

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index b437593b228..260cae67e56 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -129,7 +129,10 @@ repos:
       name: *id2
       language: unsupported_script
       entry: gdb/contrib/check-whitespace-pre-commit.py
-      types: ['text']
+      # Don't filter files on types, allowing this hook to see same files as
+      # git usage outside pre-commit. Instead, filter files in the entry point.
+      types: *types_default
+      types_or: *types_or_default
       files: *gdb_files
     - id: &id3 pre-commit-setup
       name: *id3
diff --git a/gdb/doc/.gitattributes b/gdb/doc/.gitattributes
new file mode 100644
index 00000000000..735e4eef89a
--- /dev/null
+++ b/gdb/doc/.gitattributes
@@ -0,0 +1,10 @@
+# -*- conf -*-
+
+# Binary format.
+*.pdf  binary
+*.png  binary
+
+# Text format, but diffs aren't useful.
+# Note that stack_frame.eps is an EPS file without embedded bitmap preview.
+*.svg  text -diff
+stack_frame.eps  text -diff
diff --git a/gdb/testsuite/.gitattributes b/gdb/testsuite/.gitattributes
new file mode 100644
index 00000000000..97a376c1938
--- /dev/null
+++ b/gdb/testsuite/.gitattributes
@@ -0,0 +1,4 @@
+# -*- conf -*-
+
+# Binary format.
+*.bz2  binary
-- 
2.51.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 5/5] [pre-commit] Don't require text type for codespell hook
  2026-07-20 12:50 [PATCH 0/5] [pre-commit] Some pre-commit improvements Tom de Vries
                   ` (3 preceding siblings ...)
  2026-07-20 12:50 ` [PATCH 4/5] [pre-commit] Don't require text type for check-whitespace hook Tom de Vries
@ 2026-07-20 12:50 ` Tom de Vries
  2026-08-03 12:25 ` [PING][PATCH 0/5] [pre-commit] Some pre-commit improvements Tom de Vries
  2026-08-12 18:16 ` [PATCH " Simon Marchi
  6 siblings, 0 replies; 12+ messages in thread
From: Tom de Vries @ 2026-07-20 12:50 UTC (permalink / raw)
  To: gdb-patches

Codespell's .pre-commit-hooks.yaml sets "types: [text]".

Override this using "types: [file]", to make the codespell hook see the same
files as codespell usage outside pre-commit:
...
$ codespell --toml gdb/pyproject.toml gdb*
...

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34411
---
 .pre-commit-config.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 260cae67e56..aeb3058f725 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -92,6 +92,11 @@ repos:
     - id: codespell
       args: &codespell_args [--toml, gdb/pyproject.toml]
       files: &gdb_files '^(gdb|gdbserver|gdbsupport)/'
+      # Override the [text] setting in .pre-commit-hooks.yaml, allowing this
+      # hook to see the same files as codespell usage outside pre-commit.
+      # Instead, filter files in gdb/pyproject.toml.
+      types: *types_default
+      types_or: *types_or_default
     - id: codespell
       name: codespell-log
       entry: gdb/contrib/codespell-log.sh
-- 
2.51.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PING][PATCH 0/5] [pre-commit] Some pre-commit improvements
  2026-07-20 12:50 [PATCH 0/5] [pre-commit] Some pre-commit improvements Tom de Vries
                   ` (4 preceding siblings ...)
  2026-07-20 12:50 ` [PATCH 5/5] [pre-commit] Don't require text type for codespell hook Tom de Vries
@ 2026-08-03 12:25 ` Tom de Vries
  2026-08-12 18:16 ` [PATCH " Simon Marchi
  6 siblings, 0 replies; 12+ messages in thread
From: Tom de Vries @ 2026-08-03 12:25 UTC (permalink / raw)
  To: gdb-patches

On 7/20/26 2:50 PM, Tom de Vries wrote:
> This patch series contains some pre-commit improvements.
> 
> The third patch fixes the problem that flake8 is not run for gdb/gdb-gdb.py.in.
> 
> The first and second patch fix flake8 problems in gdb/gdb-gdb.py.in.
> 
> The fourth and fifth patch makes pre-commit rely less on types filtering,
> fixing PR build/34411.
> 

Ping.

Thanks,
- Tom

> Tested on x86_64-linux.
> 
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34411
> 
> Tom de Vries (5):
>    [gdb] Fix bare except in gdb/gdb-gdb.py.in
>    [gdb] Remove superfluous global in gdb/gdb-gdb.py.in
>    [pre-commit] Run flake8 for gdb/gdb-gdb.py.in
>    [pre-commit] Don't require text type for check-whitespace hook
>    [pre-commit] Don't require text type for codespell hook
> 
>   .pre-commit-config.yaml      | 25 ++++++++++++++++++++-----
>   gdb/doc/.gitattributes       | 10 ++++++++++
>   gdb/gdb-gdb.py.in            |  3 +--
>   gdb/testsuite/.gitattributes |  4 ++++
>   4 files changed, 35 insertions(+), 7 deletions(-)
>   create mode 100644 gdb/doc/.gitattributes
>   create mode 100644 gdb/testsuite/.gitattributes
> 
> 
> base-commit: cef1fbf3b02ff6e5bc62e1b8a7d30c0a32b8b9f7


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 3/5] [pre-commit] Run flake8 for gdb/gdb-gdb.py.in
  2026-07-20 12:50 ` [PATCH 3/5] [pre-commit] Run flake8 for gdb/gdb-gdb.py.in Tom de Vries
@ 2026-08-12 18:15   ` Simon Marchi
  2026-08-13  5:19     ` Tom de Vries
  0 siblings, 1 reply; 12+ messages in thread
From: Simon Marchi @ 2026-08-12 18:15 UTC (permalink / raw)
  To: Tom de Vries, gdb-patches

On 7/20/26 8:50 AM, Tom de Vries wrote:
> When running the pre-commit hooks for gdb/gdb-gdb.py.in:
> ...
> $ pre-commit run --files gdb/gdb-gdb.py.in
> black...................................................................Passed
> flake8..............................................(no files to check)Skipped
> isort...................................................................Passed
> codespell...............................................................Passed
> tclint..............................................(no files to check)Skipped
> check-include-guards................................(no files to check)Skipped
> check-gnu-style.....................................(no files to check)Skipped
> - hook id: check-gnu-style
> check-whitespace........................................................Passed
> pre-commit-setup........................................................Passed
> check-file-mode.........................................................Passed
> ...
> we see that flake8 is skipped.
> 
> The hook setup has a types_or workaround that's supposed to prevent this:
> ...
>     - id: flake8
>       types_or: *gdb_python_types
>       files: *gdb_python_files
>       args: [--config, gdb/setup.cfg]
> ...
> but that doesn't work because flake8's .pre-commit-hooks.yaml doesn't set
> types_or, but types:
> ...
>     types: [python]
> ...
> 
> So we end up with an effective setting of both types and types_or:
> ...
>     types: [python]
>     types_or: [file]
> ...
> which both have to be matched, and because gdb/gdb-gdb.py.in doesn't match
> python:
> ...
> $ identify-cli gdb/gdb-gdb.py.in
> ["file", "non-executable", "text"]
> ...
> the file is skipped.
> 
> This could be fixed by:
> ...
> -    types_or: [file]
> +    types: [file]
> ...
> but an isort update setting types_or could reintroduce the same problem.
> 
> For robustness, fix this by setting both types and types_or for each python
> hook.
> 
> Using the same value for both settings would work:
> ...
>     types: [file]
>     types_or: [file]
> ...
> because types and types_or have the same effect for list lengths 0 and 1.
> 
> But I think it's better to have different anchors to avoid any confusion about
> the and/or behavior, in which case it's more natural to use the actual default
> [] for types_or, and to update the anchor names to reflect that these are the
> default values:
> ...
>     types: &types_default [file]
>     types_or: &types_or_default []
> ...

Are we doing all this just for gdb-gdb.py.in?  Because it might not need
to be a ".in" file, I don't see any substitution in it (unlike
gdb-gdb.gdb.in).  Could we rename it to gdb-gdb.py and use
AC_CONFIG_LINKS on it?  Would that simplify things?

Simon

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/5] [pre-commit] Some pre-commit improvements
  2026-07-20 12:50 [PATCH 0/5] [pre-commit] Some pre-commit improvements Tom de Vries
                   ` (5 preceding siblings ...)
  2026-08-03 12:25 ` [PING][PATCH 0/5] [pre-commit] Some pre-commit improvements Tom de Vries
@ 2026-08-12 18:16 ` Simon Marchi
  2026-08-13  5:26   ` Tom de Vries
  6 siblings, 1 reply; 12+ messages in thread
From: Simon Marchi @ 2026-08-12 18:16 UTC (permalink / raw)
  To: Tom de Vries, gdb-patches

On 7/20/26 8:50 AM, Tom de Vries wrote:
> This patch series contains some pre-commit improvements.
> 
> The third patch fixes the problem that flake8 is not run for gdb/gdb-gdb.py.in.
> 
> The first and second patch fix flake8 problems in gdb/gdb-gdb.py.in.
> 
> The fourth and fifth patch makes pre-commit rely less on types filtering,
> fixing PR build/34411.
> 
> Tested on x86_64-linux.
> 
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34411
> 
> Tom de Vries (5):
>   [gdb] Fix bare except in gdb/gdb-gdb.py.in
>   [gdb] Remove superfluous global in gdb/gdb-gdb.py.in
>   [pre-commit] Run flake8 for gdb/gdb-gdb.py.in
>   [pre-commit] Don't require text type for check-whitespace hook
>   [pre-commit] Don't require text type for codespell hook

FYI, I think that patches 1 and 2 are no longer necessary, because the
code has changed.

Simon

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 3/5] [pre-commit] Run flake8 for gdb/gdb-gdb.py.in
  2026-08-12 18:15   ` Simon Marchi
@ 2026-08-13  5:19     ` Tom de Vries
  0 siblings, 0 replies; 12+ messages in thread
From: Tom de Vries @ 2026-08-13  5:19 UTC (permalink / raw)
  To: Simon Marchi, gdb-patches

On 8/12/26 8:15 PM, Simon Marchi wrote:
> On 7/20/26 8:50 AM, Tom de Vries wrote:
>> When running the pre-commit hooks for gdb/gdb-gdb.py.in:
>> ...
>> $ pre-commit run --files gdb/gdb-gdb.py.in
>> black...................................................................Passed
>> flake8..............................................(no files to check)Skipped
>> isort...................................................................Passed
>> codespell...............................................................Passed
>> tclint..............................................(no files to check)Skipped
>> check-include-guards................................(no files to check)Skipped
>> check-gnu-style.....................................(no files to check)Skipped
>> - hook id: check-gnu-style
>> check-whitespace........................................................Passed
>> pre-commit-setup........................................................Passed
>> check-file-mode.........................................................Passed
>> ...
>> we see that flake8 is skipped.
>>
>> The hook setup has a types_or workaround that's supposed to prevent this:
>> ...
>>      - id: flake8
>>        types_or: *gdb_python_types
>>        files: *gdb_python_files
>>        args: [--config, gdb/setup.cfg]
>> ...
>> but that doesn't work because flake8's .pre-commit-hooks.yaml doesn't set
>> types_or, but types:
>> ...
>>      types: [python]
>> ...
>>
>> So we end up with an effective setting of both types and types_or:
>> ...
>>      types: [python]
>>      types_or: [file]
>> ...
>> which both have to be matched, and because gdb/gdb-gdb.py.in doesn't match
>> python:
>> ...
>> $ identify-cli gdb/gdb-gdb.py.in
>> ["file", "non-executable", "text"]
>> ...
>> the file is skipped.
>>
>> This could be fixed by:
>> ...
>> -    types_or: [file]
>> +    types: [file]
>> ...
>> but an isort update setting types_or could reintroduce the same problem.
>>
>> For robustness, fix this by setting both types and types_or for each python
>> hook.
>>
>> Using the same value for both settings would work:
>> ...
>>      types: [file]
>>      types_or: [file]
>> ...
>> because types and types_or have the same effect for list lengths 0 and 1.
>>
>> But I think it's better to have different anchors to avoid any confusion about
>> the and/or behavior, in which case it's more natural to use the actual default
>> [] for types_or, and to update the anchor names to reflect that these are the
>> default values:
>> ...
>>      types: &types_default [file]
>>      types_or: &types_or_default []
>> ...
> 
> Are we doing all this just for gdb-gdb.py.in? 

Yes.

> Because it might not need
> to be a ".in" file, I don't see any substitution in it (unlike
> gdb-gdb.gdb.in).  Could we rename it to gdb-gdb.py and use
> AC_CONFIG_LINKS on it?  Would that simplify things?

I've given the rename a try: ( 
https://sourceware.org/pipermail/gdb-patches/2026-August/229422.html ).

Thanks,
- Tom

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/5] [pre-commit] Some pre-commit improvements
  2026-08-12 18:16 ` [PATCH " Simon Marchi
@ 2026-08-13  5:26   ` Tom de Vries
  2026-08-25 12:52     ` Tom de Vries
  0 siblings, 1 reply; 12+ messages in thread
From: Tom de Vries @ 2026-08-13  5:26 UTC (permalink / raw)
  To: Simon Marchi, gdb-patches

On 8/12/26 8:16 PM, Simon Marchi wrote:
> On 7/20/26 8:50 AM, Tom de Vries wrote:
>> This patch series contains some pre-commit improvements.
>>
>> The third patch fixes the problem that flake8 is not run for gdb/gdb-gdb.py.in.
>>
>> The first and second patch fix flake8 problems in gdb/gdb-gdb.py.in.
>>
>> The fourth and fifth patch makes pre-commit rely less on types filtering,
>> fixing PR build/34411.
>>
>> Tested on x86_64-linux.
>>
>> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34411
>>
>> Tom de Vries (5):
>>    [gdb] Fix bare except in gdb/gdb-gdb.py.in
>>    [gdb] Remove superfluous global in gdb/gdb-gdb.py.in
>>    [pre-commit] Run flake8 for gdb/gdb-gdb.py.in
>>    [pre-commit] Don't require text type for check-whitespace hook
>>    [pre-commit] Don't require text type for codespell hook
> 
> FYI, I think that patches 1 and 2 are no longer necessary, because the
> code has changed.

Indeed, thanks for pointing that out.

I've now submitted an alternative to patch 3.

Patches 4 and 5 still make sense, but both don't apply cleanly without 
patch 3.  So I'll wait what happens with the alternative to decide how 
to proceed.

Thanks,
- Tom

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/5] [pre-commit] Some pre-commit improvements
  2026-08-13  5:26   ` Tom de Vries
@ 2026-08-25 12:52     ` Tom de Vries
  0 siblings, 0 replies; 12+ messages in thread
From: Tom de Vries @ 2026-08-25 12:52 UTC (permalink / raw)
  To: Simon Marchi, gdb-patches

On 8/13/26 7:26 AM, Tom de Vries wrote:
> On 8/12/26 8:16 PM, Simon Marchi wrote:
>> On 7/20/26 8:50 AM, Tom de Vries wrote:
>>> This patch series contains some pre-commit improvements.
>>>
>>> The third patch fixes the problem that flake8 is not run for gdb/gdb- 
>>> gdb.py.in.
>>>
>>> The first and second patch fix flake8 problems in gdb/gdb-gdb.py.in.
>>>
>>> The fourth and fifth patch makes pre-commit rely less on types 
>>> filtering,
>>> fixing PR build/34411.
>>>
>>> Tested on x86_64-linux.
>>>
>>> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34411
>>>
>>> Tom de Vries (5):
>>>    [gdb] Fix bare except in gdb/gdb-gdb.py.in
>>>    [gdb] Remove superfluous global in gdb/gdb-gdb.py.in
>>>    [pre-commit] Run flake8 for gdb/gdb-gdb.py.in
>>>    [pre-commit] Don't require text type for check-whitespace hook
>>>    [pre-commit] Don't require text type for codespell hook
>>
>> FYI, I think that patches 1 and 2 are no longer necessary, because the
>> code has changed.
> 
> Indeed, thanks for pointing that out.
> 
> I've now submitted an alternative to patch 3.
> 

I've now pushed that one.

> Patches 4 and 5 still make sense, but both don't apply cleanly without 
> patch 3.  So I'll wait what happens with the alternative to decide how 
> to proceed.
> 

I've updated and pushed these two as well.

Thanks,
- Tom

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-08-25 12:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-20 12:50 [PATCH 0/5] [pre-commit] Some pre-commit improvements Tom de Vries
2026-07-20 12:50 ` [PATCH 1/5] [gdb] Fix bare except in gdb/gdb-gdb.py.in Tom de Vries
2026-07-20 12:50 ` [PATCH 2/5] [gdb] Remove superfluous global " Tom de Vries
2026-07-20 12:50 ` [PATCH 3/5] [pre-commit] Run flake8 for gdb/gdb-gdb.py.in Tom de Vries
2026-08-12 18:15   ` Simon Marchi
2026-08-13  5:19     ` Tom de Vries
2026-07-20 12:50 ` [PATCH 4/5] [pre-commit] Don't require text type for check-whitespace hook Tom de Vries
2026-07-20 12:50 ` [PATCH 5/5] [pre-commit] Don't require text type for codespell hook Tom de Vries
2026-08-03 12:25 ` [PING][PATCH 0/5] [pre-commit] Some pre-commit improvements Tom de Vries
2026-08-12 18:16 ` [PATCH " Simon Marchi
2026-08-13  5:26   ` Tom de Vries
2026-08-25 12:52     ` Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox