Skip to content

Commit 8099553

Browse files
committed
generated: Regenerate handwritten
1 parent 031b5ec commit 8099553

14 files changed

+18
-34
lines changed

generated/nidaqmx/_dotenvpath.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,27 +45,12 @@ def _get_caller_path() -> Path | None:
4545
for frame, _ in traceback.walk_stack(inspect.currentframe()):
4646
if frame.f_code.co_filename:
4747
module_path = Path(frame.f_code.co_filename)
48-
if _exists(module_path) and not module_path.is_relative_to(package_path):
48+
if module_path.exists() and not module_path.is_relative_to(package_path):
4949
return module_path
5050

5151
return None
5252

5353

54-
# Path.exists() throws OSError when the path has invalid file characters.
55-
# https://github.com/python/cpython/issues/79487
56-
if sys.version_info >= (3, 10):
57-
58-
def _exists(path: Path) -> bool:
59-
return path.exists()
60-
61-
else:
62-
63-
def _exists(path: Path) -> bool:
64-
import os
65-
66-
return os.path.exists(path)
67-
68-
6954
def _get_package_path() -> Path:
7055
"""Get the path of this package."""
7156
module = sys.modules[__package__]

generated/nidaqmx/_feature_toggles.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,17 @@
44

55
import functools
66
import sys
7+
from collections.abc import Callable
78
from enum import Enum
8-
from typing import TYPE_CHECKING, Callable, TypeVar
9+
from typing import TYPE_CHECKING, TypeVar
910

1011
from decouple import AutoConfig, Undefined, undefined
1112

1213
from nidaqmx._dotenvpath import get_dotenv_search_path
1314
from nidaqmx.errors import FeatureNotSupportedError
1415

1516
if TYPE_CHECKING:
16-
if sys.version_info >= (3, 10):
17-
from typing import ParamSpec
18-
else:
19-
from typing_extensions import ParamSpec
17+
from typing import ParamSpec
2018

2119
if sys.version_info >= (3, 11):
2220
from typing import Self

generated/nidaqmx/_install_daqmx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import sys
1111
import tempfile
1212
import zipfile
13-
from typing import Generator
13+
from collections.abc import Generator
1414
from urllib.parse import urlparse
1515

1616
import click

generated/nidaqmx/_lib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
)
1818

1919
if TYPE_CHECKING:
20-
from typing_extensions import TypeAlias
20+
from typing import TypeAlias
2121

2222

2323
_DAQ_NOT_FOUND_MESSAGE = (

generated/nidaqmx/_linux_installation_commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

3+
from collections.abc import Callable
34
from dataclasses import dataclass
4-
from typing import Callable
55

66

77
def _get_version_ubuntu(dist_version: str) -> str:

generated/nidaqmx/stream_writers/_digital_multi_channel_writer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

3-
from typing import Any, Sequence
3+
from collections.abc import Sequence
4+
from typing import Any
45

56
from nitypes.waveform import DigitalWaveform
67

generated/nidaqmx/system/_collections/device_collection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def __getitem__(self, index):
6767
return [_DeviceAlternateConstructor(name, self._interpreter) for name in device_names]
6868
else:
6969
raise DaqError(
70-
'Invalid index type "{}" used to access collection.'.format(type(index)),
70+
f'Invalid index type "{type(index)}" used to access collection.',
7171
DAQmxErrors.UNKNOWN,
7272
)
7373

generated/nidaqmx/system/_collections/persisted_channel_collection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def __getitem__(self, index):
7474
]
7575
else:
7676
raise DaqError(
77-
'Invalid index type "{}" used to access collection.'.format(type(index)),
77+
f'Invalid index type "{type(index)}" used to access collection.',
7878
DAQmxErrors.UNKNOWN,
7979
)
8080

generated/nidaqmx/system/_collections/persisted_scale_collection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def __getitem__(self, index):
7070
return [_PersistedScaleAlternateConstructor(name, self._interpreter) for name in names]
7171
else:
7272
raise DaqError(
73-
'Invalid index type "{}" used to access collection.'.format(type(index)),
73+
f'Invalid index type "{type(index)}" used to access collection.',
7474
DAQmxErrors.UNKNOWN,
7575
)
7676

generated/nidaqmx/system/_collections/persisted_task_collection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def __getitem__(self, index):
7070
return [_PersistedTaskAlternateConstructor(name, self._interpreter) for name in names]
7171
else:
7272
raise DaqError(
73-
'Invalid index type "{}" used to access collection.'.format(type(index)),
73+
f'Invalid index type "{type(index)}" used to access collection.',
7474
DAQmxErrors.UNKNOWN,
7575
)
7676

0 commit comments

Comments
 (0)