Merge pull request #11093 from yuwata/update-python-scripts-for-lgtm

Update python scripts for lgtm
This commit is contained in:
Lennart Poettering
2018-12-10 11:13:21 +01:00
committed by GitHub
11 changed files with 15 additions and 20 deletions

View File

@@ -8,3 +8,6 @@ extraction:
after_prepare:
- pip3 install meson
- export PATH="$HOME/.local/bin/:$PATH"
python:
python_setup:
version: 3

View File

@@ -17,7 +17,6 @@ TAB = White('\t', exact=1).suppress()
COMMENTLINE = pythonStyleComment + EOL
EMPTYLINE = LineEnd()
text_eol = lambda name: Regex(r'[^\n]+')(name) + EOL
# text_eol = lambda name: Word(printables + ' ' + '®üäßçõãİó ×²⁶´‐“\u200E\u200B')(name) + EOL
def klass_grammar():
klass_line = Literal('C ').suppress() + NUM2('klass') + text_eol('text')

View File

@@ -1,6 +1,5 @@
#!/usr/bin/env python3
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
# SPDX-License-Identifier: MIT
# SPDX-License-Identifier: MIT
#
# This file is distributed under the MIT license, see below.
#
@@ -30,8 +29,7 @@ import sys
import os
try:
from pyparsing import (Word, White, Literal, ParserElement, Regex,
LineStart, LineEnd,
from pyparsing import (Word, White, Literal, ParserElement, Regex, LineEnd,
OneOrMore, Combine, Or, Optional, Suppress, Group,
nums, alphanums, printables,
stringEnd, pythonStyleComment, QuotedString,

View File

@@ -1,10 +1,10 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1+
# SPDX-License-Identifier: LGPL-2.1+
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
import os
import sys

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env python3
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
# SPDX-License-Identifier: MIT
#
# This file is distributed under the MIT license, see below.

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env python3
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
# SPDX-License-Identifier: LGPL-2.1+
from __future__ import print_function
@@ -16,7 +15,6 @@ class sd_dump_hashmaps(gdb.Command):
d = gdb.parse_and_eval("hashmap_debug_list")
all_entry_sizes = gdb.parse_and_eval("all_entry_sizes")
all_direct_buckets = gdb.parse_and_eval("all_direct_buckets")
hashmap_base_t = gdb.lookup_type("HashmapBase")
uchar_t = gdb.lookup_type("unsigned char")
ulong_t = gdb.lookup_type("unsigned long")
debug_offset = gdb.parse_and_eval("(unsigned long)&((HashmapBase*)0)->debug")

View File

@@ -1,6 +1,8 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1+
"""Generate %-from-name.gperf from %-list.txt
"""
Generate %-from-name.gperf from %-list.txt
"""
import sys

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env python3
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
# SPDX-License-Identifier: LGPL-2.1+
import sys

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env python3
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
# SPDX-License-Identifier: LGPL-2.1+
import collections

View File

@@ -1,6 +1,5 @@
#!/usr/bin/env python3
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
# SPDX-License-Identifier: LGPL-2.1+
# SPDX-License-Identifier: LGPL-2.1+
from __future__ import print_function
import collections

View File

@@ -1,6 +1,5 @@
#!/usr/bin/env python3
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
# SPDX-License-Identifier: LGPL-2.1+
# SPDX-License-Identifier: LGPL-2.1+
from lxml import etree as tree