-
Notifications
You must be signed in to change notification settings - Fork 91
Convert OdxLinkId.doc_fragments and OdxLinkRef.ref_docs to tuple #410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5552111
d7c9178
eeea57b
4101a77
34aef86
96bb6e7
b6e26c7
7aa448b
bff4ca6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ | |
from .hierarchyelementraw import HierarchyElementRaw | ||
|
||
if TYPE_CHECKING: | ||
from .database import Database | ||
from ..database import Database | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mypy didn't catch this ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @zariiii9003: how did you find this? if using tools, can/should we change the CI system to do the same? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I noticed red squiggly lines in my IDE. I also wonder why both ruff and mypy seem to ignore it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok. Seems like you should continue to let your IDE look at odxtools. mine (emacs) is not sophisticated enough ;) |
||
from .protocol import Protocol | ||
|
||
TNamed = TypeVar("TNamed", bound=OdxNamed) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
from typing import TYPE_CHECKING, NamedTuple | ||
from dataclasses import dataclass | ||
from typing import TYPE_CHECKING | ||
|
||
from packaging.version import Version | ||
|
||
if TYPE_CHECKING: | ||
from odxtools.odxlink import OdxDocFragment | ||
|
||
|
||
class OdxDocContext(NamedTuple): | ||
@dataclass(slots=True, frozen=True) | ||
class OdxDocContext: | ||
version: Version | ||
doc_fragments: list["OdxDocFragment"] | ||
|
||
# the doc_fragments are either tuple(doc_frag(category),) | ||
# or tuple(doc_frag(category), doc_frag(diag_layer)) | ||
doc_fragments: tuple["OdxDocFragment"] | tuple["OdxDocFragment", "OdxDocFragment"] | ||
kayoub5 marked this conversation as resolved.
Show resolved
Hide resolved
|
Uh oh!
There was an error while loading. Please reload this page.