strictdoc icon indicating copy to clipboard operation
strictdoc copied to clipboard

2024-Q3/Q4: Code climate

Open stanislaw opened this issue 1 year ago • 0 comments

Previous: https://github.com/strictdoc-project/strictdoc/issues/1770 Next: TBD


  • [x] Remove unused render_free_text(). https://github.com/strictdoc-project/strictdoc/pull/1924
  • [x] https://github.com/strictdoc-project/strictdoc/pull/1927
  • [ ] https://github.com/strictdoc-project/strictdoc/pull/1955
  • [ ] requirement_type -> node_type.
  • [ ] do_open_form_edit_requirement -> do_open_form_edit_node.
  • [ ] # TODO: Check if this line is still needed (might be some older workaround).
  • [ ] test_20_single_document_add_second_child_relation_with_role – Why does it work when the grammar does not have "Child", "IsImplementedBy"?
  • [ ] output/cache/ instead of $TMPDIR.
  • [ ] https://github.com/strictdoc-project/strictdoc/issues/1468
  • [ ] .is_requirement -> .is_requirement().
  • [ ] https://github.com/strictdoc-project/strictdoc/issues/1502
  • [ ] Make SDoc's grammar require STATEMENT/DESCRIPTION/CONTENT to have REQUIRED: True.
  • [ ] SDoc: Graph database: Unify all entities.
  • [ ] self.ng_document_reference: Optional[DocumentReference] = None – is there a way to make it non-optional?
  • [ ] node_controls partial is extremely complicated.
  • [ ] Resolve circular references between SDocDocument and DocumentReference and other classes. Make the overall type system stronger.
  • [ ] https://github.com/strictdoc-project/strictdoc/issues/1020
  • [ ] Finish migration to streams rendered from view objects.
  • [ ] mypy: fix remaining arg-type issues.
  • [ ] mypy: fix remaining attr-defined issues.
  • [ ] mypy: fix remaining no-any-return issues.
  • [ ] mypy: fix remaining no-untyped-def issues.
  • [ ] mypy: fix remaining no-redef issues.
  • [ ] mypy: fix remaining type-arg issues.
  • [ ] mypy: fix remaining union-attr issues.
  • [ ] mypy: fix remaining var-annotated issues.
  • [ ] FileEntry: make it use SDocRelativePath instead of separate POSIX path field.
  • [ ] 01_main_page_serves_304 end2end test does not work on macOS GitHub Actions.
  • [ ] strictdoc/export/rst/templates/requirement.jinja.rst has funny rstrip(). Could not be removed just yet.
  • [ ] Flaky end2end tests:
    • [ ] Rarely but flaky: update_section_add_link_to_existing_section_anchor_from_clipboard. Not always copied to clipboard -> update_node_add_link_to_existing_section_anchor_from_clipboard.
    • [ ] Flaky test: create_requirement_validate_relation_parent_does_not_exist.
    • [ ] Flaky test: _validations\delete_node_with_anchor_that_has_incoming_links.
    • [ ] create_requirement_generate_autouid_when_requirement_with_another_prefix_exists.
    • [ ] export_to_pdf_basic, https://github.com/strictdoc-project/strictdoc/actions/runs/10130508488/job/28011977903?pr=1929, https://github.com/strictdoc-project/strictdoc/actions/runs/10539860537/job/29203900243?pr=1941.
    • [ ] edit_grammar_add_field_move_up_and_down_save, https://github.com/strictdoc-project/strictdoc/actions/runs/10244497289/job/28337588222?pr=1932.
    • [ ] edit_grammar_move_field_down, https://github.com/strictdoc-project/strictdoc/actions/runs/10256651383/job/28376187324?pr=1932.
    • [ ] delete_requirement_delete_newly_created, https://github.com/strictdoc-project/strictdoc/actions/runs/10256651383/job/28376187324.
  • [ ] mypy issue with pygmented_source_file_lines (see the description below).

        pygmented_source_file_lines: List[Union[str, RangeMarkerTuple]] = list(

This is for mypy... Honestly I don't understand why we have to make a list()-copy of pygmented_source_file_content.split("\n"). Without list(), mypy would claim

error: Incompatible types in assignment (expression has type "List[str]", variable has type "List[Union[str, RangeMarkerTuple]]")

I know assignment would be a problem without explicit annotation of pygmented_source_file_lines because of list invariance. But the annotation is there... why do we still need list()?

stanislaw avatar Jul 07 '24 11:07 stanislaw