12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
I, [2024-11-21T08:38:54.019130 #1] INFO -- : Skipping file runtests.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /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/python2/lib/python2.7/ast.py", line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 156
def get_default_settings(*, database_name=DEFAULT_DATABASE_NAME):
^
SyntaxError: invalid syntax
I, [2024-11-21T08:38:54.059268 #1] INFO -- : Skipping file ./simple_history/management/commands/clean_duplicate_history.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /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/python2/lib/python2.7/ast.py", line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 79
self.log(f"{model} has {found} historical entries", 2)
^
SyntaxError: invalid syntax
I, [2024-11-21T08:38:54.073225 #1] INFO -- : Skipping file ./simple_history/management/commands/populate_history.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /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/python2/lib/python2.7/ast.py", line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 85
self.stderr.write(f"{e}\n")
^
SyntaxError: invalid syntax
I, [2024-11-21T08:38:54.075349 #1] INFO -- : Skipping file ./simple_history/management/commands/clean_old_history.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /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/python2/lib/python2.7/ast.py", line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 63
self.log(f"{model} has {found} old historical entries", 2)
^
SyntaxError: invalid syntax
I, [2024-11-21T08:38:54.087226 #1] INFO -- : Skipping file simple_history/manager.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /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/python2/lib/python2.7/ast.py", line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 32
def as_instances(self) -> "HistoricalQuerySet":
^
SyntaxError: invalid syntax
I, [2024-11-21T08:38:54.098766 #1] INFO -- : Skipping file simple_history/template_utils.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /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/python2/lib/python2.7/ast.py", line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 14
def conditional_str(obj: Any) -> str:
^
SyntaxError: invalid syntax
I, [2024-11-21T08:38:54.100270 #1] INFO -- : Skipping file simple_history/admin.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /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/python2/lib/python2.7/ast.py", line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 112
self, request, history_manager: HistoryManager, pk_name: str, object_id: Any
^
SyntaxError: invalid syntax
I, [2024-11-21T08:38:54.110372 #1] INFO -- : Skipping file simple_history/__init__.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /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/python2/lib/python2.7/ast.py", line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 12
**records_config,
^
SyntaxError: invalid syntax
I, [2024-11-21T08:38:54.112051 #1] INFO -- : Skipping file simple_history/middleware.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /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/python2/lib/python2.7/ast.py", line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 33
async def middleware(request):
^
SyntaxError: invalid syntax
I, [2024-11-21T08:38:54.121881 #1] INFO -- : Skipping file simple_history/utils.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /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/python2/lib/python2.7/ast.py", line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 34
raise NotHistoricalModelError(f"Cannot find a historical model for {model}.")
^
SyntaxError: invalid syntax
I, [2024-11-21T08:38:54.137076 #1] INFO -- : Skipping file simple_history/models.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /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/python2/lib/python2.7/ast.py", line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 256
return f"{self.DEFAULT_MODEL_NAME_PREFIX}{model._meta.object_name}"
^
SyntaxError: invalid syntax
|
INFO: Java 1.8.0_111-internal Oracle Corporation (64-bit)
INFO: Linux 4.4.0-1128-aws amd64
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-core-2.17.0.899.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-cli-2.1.0.566.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
INFO: Index files
INFO: Invalid character encountered in file '/code/simple_history/locale/nb/LC_MESSAGES/django.mo' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/simple_history/locale/ru_RU/LC_MESSAGES/django.mo' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/simple_history/locale/ur/LC_MESSAGES/django.mo' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/simple_history/locale/cs_CZ/LC_MESSAGES/django.mo' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/simple_history/locale/de/LC_MESSAGES/django.mo' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/simple_history/locale/zh_Hans/LC_MESSAGES/django.mo' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/simple_history/locale/fr/LC_MESSAGES/django.mo' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/simple_history/locale/pt_BR/LC_MESSAGES/django.mo' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/simple_history/locale/pl/LC_MESSAGES/django.mo' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/simple_history/locale/ar/LC_MESSAGES/django.mo' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/simple_history/locale/id/LC_MESSAGES/django.mo' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/docs/screens/3_poll_reverted.png' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/docs/screens/5_history_list_display.png' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/docs/screens/1_poll_history.png' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/docs/screens/4_history_after_poll_reverted.png' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/docs/screens/10_revert_disabled.png' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/docs/screens/2_revert.png' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: 92 files indexed
ERROR: Unable to parse file: /code/simple_history/template_utils.py
ERROR: Parse error at line 39 column 44:
23: (s: Any) -> bool:
24: """
25: Returns whether ``s`` is a (presumably) pre-escaped string or not.
26:
27: This relies on the same ``__html__`` convention as Django's ``conditional_escape``
28: does.
29: """
30: return hasattr(s, "__html__")
31:
32:
33: class HistoricalRecordContextHelper:
34: """
35: Class containing various utilities for formatting the template context for
36: a historical record.
37: """
38:
--> DEFAULT_MAX_DISPLAYED_DELTA_CHANGE_CHARS: Final = 100
40:
41: def __init__(
42: self,
43: model: Type[Model],
44: historical_record: HistoricalChanges,
45: *,
46: max_displayed_delta_change_chars=DEFAULT_MAX_DISPLAYED_DELTA_CHANGE_CHARS,
47: ):
48:
ERROR: Unable to parse file: /code/simple_history/admin.py
ERROR: Parse error at line 124 column 10:
109:
110:
111: def get_history_queryset(
112: self, request, history_manager: HistoryManager, pk_name: str, object_id: Any
113: ) -> QuerySet:
114: """
115: Return a ``QuerySet`` of all historical records that should be listed in the
116: ``object_history_list_template`` template.
117: This is used by ``history_view()``.
118:
119: :param request:
120: :param history_manager:
121: :param pk_name: The name of the original model's primary key field.
122: :param object_id: The primary key of the object whose history is listed.
123: """
--> qs: HistoricalQuerySet = history_manager.filter(**{pk_name: object_id})
125: if not isinstance(history_manager.model.history_user, property):
126:
127:
ERROR: Unable to parse file: /code/simple_history/__init__.py
ERROR: Parse error at line 12 column 20:
3: metadata.version("django-simple-history")
4:
5:
6: def register(
7: model,
8: app=None,
9: manager_name="history",
10: records_class=None,
11: table_name=None,
--> **records_config,
13: ):
14: """
15: Create historical model for `model` and attach history manager to `model`.
16:
17: Keyword arguments:
18: app -- App to install historical model into (defaults to model.__module__)
19: manager_name -- class attribute name to use for historical manager
20: records_class -- class to use for history relation (defaults to
21: HistoricalRecords)
22: table_name -- Custom name for history table (defaults to
23: 'APPNAME_historicalMODELNAME')
24:
25: This method should be used as an alternative to attaching an
26: `HistoricalManager` instance directly to `model`.
27: """
28: from . import models
29:
30: if records_class is None:
31: records_class = models.HistoricalRecords
32:
33: records = records_class(
ERROR: Unable to parse file: /code/simple_history/models.py
ERROR: Parse error at line 1036 column 4:
1030: self,
1031: old_history: "HistoricalChanges",
1032: excluded_fields: Iterable[str] = None,
1033: included_fields: Iterable[str] = None,
1034: *,
1035: foreign_keys_are_objs=False,
--> ) -> "ModelDelta":
1037: """
1038: :param old_history:
1039: :param excluded_fields: The names of fields to exclude from diffing.
1040: This takes precedence over ``included_fields``.
1041: :param included_fields: The names of the only fields to include when diffing.
1042: If not provided, all history-tracked fields will be included.
1043: :param foreign_keys_are_objs: If ``False``, the returned diff will only contain
1044: the raw PKs of any ``ForeignKey`` fields.
1045: If ``True``, the diff will contain the actual related model objects
1046: instead of just the PKs; deleted related objects will be instances of
1047: ``DeletedObject``.
1048: Note that passing ``True`` will necessarily query the database if the
1049: related objects have not been prefetched (using e.g.
1050: ``select_related()``).
1051: """
1052: if not isinstance(old_history, type(self)):
1053: raise TypeError(
1054: "unsupported type(s) for diffing:"
1055: f" '{type(self)}' and '{type(old_history)}'"
1056: )
1057:
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.529s
INFO: Final Memory: 6M/295M
INFO: ------------------------------------------------------------------------
|