• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

SPF-OST / pytrnsys / 15706698083

17 Jun 2025 12:04PM UTC coverage: 28.985% (+0.02%) from 28.963%
15706698083

push

github

zuckerruebe
Remove unused argument.

4051 of 13976 relevant lines covered (28.99%)

0.29 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

93.55
/pytrnsys/rsim/command.py
1
import collections.abc as _cabc
1✔
2
import dataclasses as _dc
1✔
3
import pathlib as _pl
1✔
4
import typing as _tp
1✔
5

6
import shortpath83 as _sp83
1✔
7

8

9
@_dc.dataclass
1✔
10
class Command:
1✔
11
    MAX_DECK_FILE_PATH_LENGTH: _tp.ClassVar[int] = 260
1✔
12

13
    trnsysExeFilePath: _pl.Path
1✔
14
    deckFilePath: _pl.Path
1✔
15
    trnsysFlags: _cabc.Sequence[str]
1✔
16

17
    def __post_init__(self) -> None:
1✔
18
        if not self.deckFilePath.is_absolute():
1✔
19
            raise ValueError("Deck file path must be absolute.", self.deckFilePath)
×
20

21
    @property
1✔
22
    def truncatedDeckFilePath(self) -> _pl.Path:
1✔
23
        # For more details see here:
24
        # https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later
25
        drive = self.deckFilePath.drive
1✔
26
        deckFilePathString = str(self.deckFilePath)
1✔
27
        pathLength = len(deckFilePathString) - len(drive)
1✔
28

29
        if pathLength < self.MAX_DECK_FILE_PATH_LENGTH:
1✔
30
            return self.deckFilePath
×
31

32
        truncatedDeckFilePathString = _sp83.get_short_path_name(deckFilePathString)
1✔
33
        truncatedDeckFilePath = _pl.Path(truncatedDeckFilePathString)
1✔
34
        return truncatedDeckFilePath
1✔
35

36
    @property
1✔
37
    def args(self) -> _cabc.Sequence[str | _pl.Path]:
1✔
38
        args: _cabc.Sequence[str | _pl.Path] = [self.trnsysExeFilePath, self.truncatedDeckFilePath, *self.trnsysFlags]
1✔
39

40
        return args
1✔
41

42
    @property
1✔
43
    def cwd(self) -> _pl.Path:
1✔
44
        return self.truncatedDeckFilePath.parent
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc