wikimedia/pywikibot

View on GitHub
IMPR: simplify diff.Hunk.create_diff #6165
xqt authored 84c2ec73
complete00:01:01
1
git clone
2
codeclimate validate-config
View output
codeclimate validate-config
No errors or warnings found in .codeclimate.yml.
3
codeclimate prepare
View output
codeclimate prepare
4
builder pull-engines
View output
determining required images
5
structure
View output
13
Parser process id: 13
codeclimate-parser socket not present
waiting 1s...
6
duplication
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
I, [2024-12-10T12:35:21.240631 #1]  INFO -- : Skipping file ./scripts/reflinks.py due to exception (CC::Engine::Analyzers::ParserError): `python3 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python3/lib/python3.7/ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<fstring>", line 1
    (name=)
         ^
SyntaxError: invalid syntax


I, [2024-12-10T12:35:26.870868 #1]  INFO -- : Skipping file ./tests/tools_tests.py due to exception (CC::Engine::Analyzers::ParserError): `python3 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 18, in to_json
    json_ast[key] = cast_value(value)
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 43, in cast_value
    return [cast_value(v) for v in value]
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 43, in <listcomp>
    return [cast_value(v) for v in value]
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 45, in cast_value
    return to_json(value)
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 18, in to_json
    json_ast[key] = cast_value(value)
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 43, in cast_value
    return [cast_value(v) for v in value]
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 43, in <listcomp>
    return [cast_value(v) for v in value]
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 45, in cast_value
    return to_json(value)
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 18, in to_json
    json_ast[key] = cast_value(value)
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 43, in cast_value
    return [cast_value(v) for v in value]
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 43, in <listcomp>
    return [cast_value(v) for v in value]
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 45, in cast_value
    return to_json(value)
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 18, in to_json
    json_ast[key] = cast_value(value)
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 45, in cast_value
    return to_json(value)
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 18, in to_json
    json_ast[key] = cast_value(value)
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 43, in cast_value
    return [cast_value(v) for v in value]
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 43, in <listcomp>
    return [cast_value(v) for v in value]
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 45, in cast_value
    return to_json(value)
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 18, in to_json
    json_ast[key] = cast_value(value)
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 33, in cast_value
    return value.decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte


I, [2024-12-10T12:35:29.940040 #1]  INFO -- : Skipping file ./pywikibot/family.py due to exception (CC::Engine::Analyzers::ParserError): `python3 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python3/lib/python3.7/ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<fstring>", line 1
    (title=)
          ^
SyntaxError: invalid syntax


I, [2024-12-10T12:35:32.923904 #1]  INFO -- : Skipping file ./pywikibot/site/_generators.py due to exception (CC::Engine::Analyzers::ParserError): `python3 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python3/lib/python3.7/ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<fstring>", line 1
    (pageids=)
            ^
SyntaxError: invalid syntax


I, [2024-12-10T12:35:33.653327 #1]  INFO -- : Skipping file ./pywikibot/comms/http.py due to exception (CC::Engine::Analyzers::ParserError): `python3 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python3/lib/python3.7/ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<fstring>", line 1
    (use_fake_user_agent=)
                        ^
SyntaxError: invalid syntax


I, [2024-12-10T12:35:35.150346 #1]  INFO -- : Skipping file ./pywikibot/tools/__init__.py due to exception (CC::Engine::Analyzers::ParserError): `python3 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 18, in to_json
    json_ast[key] = cast_value(value)
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 43, in cast_value
    return [cast_value(v) for v in value]
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 43, in <listcomp>
    return [cast_value(v) for v in value]
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 45, in cast_value
    return to_json(value)
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 18, in to_json
    json_ast[key] = cast_value(value)
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 43, in cast_value
    return [cast_value(v) for v in value]
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 43, in <listcomp>
    return [cast_value(v) for v in value]
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 45, in cast_value
    return to_json(value)
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 18, in to_json
    json_ast[key] = cast_value(value)
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 45, in cast_value
    return to_json(value)
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 18, in to_json
    json_ast[key] = cast_value(value)
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 43, in cast_value
    return [cast_value(v) for v in value]
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 43, in <listcomp>
    return [cast_value(v) for v in value]
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 45, in cast_value
    return to_json(value)
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 18, in to_json
    json_ast[key] = cast_value(value)
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 33, in cast_value
    return value.decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte


I, [2024-12-10T12:35:35.316707 #1]  INFO -- : Skipping file ./pywikibot/proofreadpage.py due to exception (CC::Engine::Analyzers::ParserError): `python3 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python3/lib/python3.7/ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<fstring>", line 1
    (value=)
          ^
SyntaxError: invalid syntax
7
fixme
fixme engine documentation