Merge branch 'main' into parse_story_structure

This commit is contained in:
Veronica Berglyd Olsen
2025-04-08 12:27:41 +02:00
87 changed files with 556 additions and 452 deletions
+5 -4
View File
@@ -29,7 +29,6 @@ import json
import logging
import random
from collections.abc import ItemsView, Iterable
from pathlib import Path
from time import time
from typing import TYPE_CHECKING
@@ -44,7 +43,9 @@ from novelwriter.error import logException
from novelwriter.text.comments import processComment
from novelwriter.text.counting import standardCounter
if TYPE_CHECKING: # pragma: no cover
if TYPE_CHECKING:
from collections.abc import ItemsView, Iterable
from novelwriter.core.item import NWItem
from novelwriter.core.project import NWProject
@@ -900,7 +901,7 @@ class IndexCache:
which provides lookup capabilities and caching for shared data.
"""
__slots__ = ("tags", "story")
__slots__ = ("story", "tags")
def __init__(self, tagsIndex: TagsIndex) -> None:
self.tags: TagsIndex = tagsIndex
@@ -921,7 +922,7 @@ class ItemIndex:
IndexHeading object for each heading of the text.
"""
__slots__ = ("_project", "_cache", "_items")
__slots__ = ("_cache", "_items", "_project")
def __init__(self, project: NWProject, tagsIndex: TagsIndex) -> None:
self._project = project