jazzband/django-simple-history

View on GitHub
Bump coverage from 7.6.8 to 7.6.9 in /requirements (#1427) #274
dependabot[bot] authored e26e3990
complete00:00:15
Your first build completed successfully!

Congratulations

Your first build completed successfully!

See the Results

1
git clone
2
codeclimate validate-config
View output
codeclimate validate-config
WARNING: engine radon: unrecognized key 'threshold'
3
codeclimate prepare
View output
codeclimate prepare
4
builder pull-engines
View output
determining required images
5
structure
View output
12
Parser process id: 12
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-17T02:17:04.850673 #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-12-17T02:17:04.885769 #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-12-17T02:17:04.896685 #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-12-17T02:17:04.897229 #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-12-17T02:17:04.908794 #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-12-17T02:17:04.919812 #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-12-17T02:17:04.920435 #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 124
    self, request, history_manager: HistoryManager, pk_name: str, object_id: Any
                                  ^
SyntaxError: invalid syntax


I, [2024-12-17T02:17:04.930693 #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-12-17T02:17:04.931572 #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-12-17T02:17:04.941761 #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-12-17T02:17:04.953462 #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 257
    return f"{self.DEFAULT_MODEL_NAME_PREFIX}{model._meta.object_name}"
                                                                      ^
SyntaxError: invalid syntax
7
bandit
bandit engine documentation
View output
[main]	INFO	profile include tests: None
[main]	INFO	profile exclude tests: None
[main]	INFO	cli include tests: None
[main]	INFO	cli exclude tests: None
[node_visitor]	INFO	Unable to find qualified name for module: runtests.py
8
radon
radon engine documentation
View output
Running radon3...
9
sonar-python
sonar-python engine documentation
View output
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 136 column 10:

  121: 
  122: 
  123:     def get_history_queryset(
  124:         self, request, history_manager: HistoryManager, pk_name: str, object_id: Any
  125:     ) -> QuerySet:
  126:         """
  127:         Return a ``QuerySet`` of all historical records that should be listed in the
  128:         ``object_history_list_template`` template.
  129:         This is used by ``history_view()``.
  130: 
  131:         :param request:
  132:         :param history_manager:
  133:         :param pk_name: The name of the original model's primary key field.
  134:         :param object_id: The primary key of the object whose history is listed.
  135:         """
  -->          qs: HistoricalQuerySet = history_manager.filter(**{pk_name: object_id})
  137:         if not isinstance(history_manager.model.history_user, property):
  138: 
  139:             

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 1041 column 4:

 1035: self,
 1036:         old_history: "HistoricalChanges",
 1037:         excluded_fields: Iterable[str] = None,
 1038:         included_fields: Iterable[str] = None,
 1039:         *,
 1040:         foreign_keys_are_objs=False,
  -->      ) -> "ModelDelta":
 1042:         """
 1043:         :param old_history:
 1044:         :param excluded_fields: The names of fields to exclude from diffing.
 1045:                This takes precedence over ``included_fields``.
 1046:         :param included_fields: The names of the only fields to include when diffing.
 1047:                If not provided, all history-tracked fields will be included.
 1048:         :param foreign_keys_are_objs: If ``False``, the returned diff will only contain
 1049:                the raw PKs of any ``ForeignKey`` fields.
 1050:                If ``True``, the diff will contain the actual related model objects
 1051:                instead of just the PKs; deleted related objects will be instances of
 1052:                ``DeletedObject``.
 1053:                Note that passing ``True`` will necessarily query the database if the
 1054:                related objects have not been prefetched (using e.g.
 1055:                ``select_related()``).
 1056:         """
 1057:         if not isinstance(old_history, type(self)):
 1058:             raise TypeError(
 1059:                 "unsupported type(s) for diffing:"
 1060:                 f" '{type(self)}' and '{type(old_history)}'"
 1061:             )
 1062: 

INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.504s
INFO: Final Memory: 6M/295M
INFO: ------------------------------------------------------------------------