Commit Graph

16 Commits

Author SHA1 Message Date
Niko Mauno
d9a96d0dd2 contrib: oe-stylize: Use Python3 explicitly
For instance on Debian based host OS 'python' is not provided by
default, which results is following error when trying to execute
oe-stylize.py script:

  /usr/bin/env: ‘python’: No such file or directory

Update the shebang to explicitly reference 'python3' instead of
'python', which should make the script better out-of-the-box
compatible with larger variety of host OSes on which Yocto based
development work takes place.

Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-06-04 22:29:46 -07:00
Niko Mauno
ef36ba48f7 contrib: oe-stylize: Fix ambiguous variable names
Fix pycodestyle warnings:

  oe-stylize.py:439:9: E741 ambiguous variable name 'l'
  oe-stylize.py:449:17: E741 ambiguous variable name 'l'

by switching iterator variables to non-ambiguous characters.

Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-06-04 22:29:46 -07:00
Jeremy Kerr
60637824d8 contrib: fix python warnings for oe-stylize
I get a couple of python SyntaxWarnings when running oe-stylize:

  [jk@pecola meta-openembedded]$ python3 contrib/oe-stylize.py
  contrib/oe-stylize.py:372: SyntaxWarning: "is not" with a literal. Did you mean "!="?
    if line is not '':
  contrib/oe-stylize.py:389: SyntaxWarning: "is" with a literal. Did you mean "=="?
    if line.isspace() or line is '':

The 'is' operator is for object reference comparison, which is not what
we want here. Change to '==' / '!=' instead.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-12-21 18:49:37 -08:00
Jeremy Kerr
022317805b contrib: allow override-style syntax for vars & routines
Currently, the variable and routine regexes don't support the
override-style syntax. This means we may break routine blocks, as we
don't recognise overridden routines with an :append/:prepend/etc.

This change adds the ":" char to the var & routine regexes.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-12-21 18:49:37 -08:00
persianpros
e0b9cd57fa PEP8 double aggressive W291 ~ W293 and W391
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-04-15 09:28:44 -07:00
persianpros
af6838a62c PEP8 double aggressive E301 ~ E306
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-04-15 09:28:44 -07:00
persianpros
144c107c42 PEP8 double aggressive E22, E224, E241, E242 and E27
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-04-15 09:28:44 -07:00
persianpros
9c8810de37 PEP8 double aggressive E20 and E211
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-04-15 09:28:44 -07:00
persianpros
fa4f448fbe PEP8 double aggressive E701, E70 and E502
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-04-15 09:28:43 -07:00
André Draszik
958bfe36e8 contrib: add MIPS_INSTRUCTION_SET
which is similar to ARM_INSTRUCTION_SET, hence we place
it nearby.

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-07-29 11:00:56 +02:00
Jose Alarcon
0330c71f59 contrib: print oldline within single quotes
Signed-off-by: Jose Alarcon <jose.alarcon@ge.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-01-04 14:56:24 +01:00
Jose Alarcon
b9db247aac contrib: add missing common OE variables
Signed-off-by: Jose Alarcon <jose.alarcon@ge.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-01-04 14:56:23 +01:00
Jose Alarcon
8ed2be22d4 contrib: ensure that oe-stylize.py works with python versions < 3.0
Signed-off-by: Jose Alarcon <jose.alarcon@ge.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-01-04 14:56:23 +01:00
Cliff Brake
20ce632750 update oe-stylize to be Python3 comaptible
Signed-off-by: Cliff Brake <cbrake@bec-systems.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2012-12-18 17:35:18 +01:00
Andreas Oberritter
77238ff12b oe-stylize.py: Add SUMMARY variable
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
2012-04-24 08:07:28 +02:00
Koen Kooi
b69e8206a7 contrib: import pw-am.sh and oe-stylize from OE classic
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
2011-10-14 14:26:33 +02:00