]> git.ipfire.org Git - thirdparty/gcc.git/commit
contrib/mklog.py: Fix issues reported by flake8
authorMartin Jambor <mjambor@suse.cz>
Tue, 3 Oct 2023 17:09:33 +0000 (19:09 +0200)
committerMartin Jambor <mjambor@suse.cz>
Tue, 3 Oct 2023 17:10:01 +0000 (19:10 +0200)
commit5f18797450549e4f67a75ee2b08cd639ae1fa54d
treec4bfe5458aed8f8ed2416a663bb187911adeab73
parented8fe3b1203b936d870d1ab79e66d34f9c955738
contrib/mklog.py: Fix issues reported by flake8

The testing infrastructure built by Martin Liška contains checking a
few python scripts in contrib witha tool flake8.  That tool recently
complains that:

  contrib/mklog.py:360:45: E711 comparison to None should be 'if cond is None:'
  contrib/mklog.py:362:1: E305 expected 2 blank lines after class or function definition, found 1

I'd like to silence these with the following, hopefully trivial,
changes.  However, I have only tested the changes by running flake8
again and running ./contrib/mklog.py --help.

Is this good for trunk?  (Or should I stop using flake8 instead?)

Thanks,

Martin

contrib/ChangeLog:

2023-10-03  Martin Jambor  <mjambor@suse.cz>

* mklog.py (skip_line_in_changelog): Compare to None using is instead
of ==, add an extra newline after the function.
contrib/mklog.py