File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 38
38
from ._support_wrappers import to_builtin as to_builtin
39
39
from ._support_wrappers import update_from_builtin as update_from_builtin
40
40
41
- from pycyphal .dsdl ._lockfile import Locker
42
-
43
41
44
42
def generate_package (* args , ** kwargs ): # type: ignore # pragma: no cover
45
43
"""Deprecated alias of :func:`compile`."""
Original file line number Diff line number Diff line change @@ -143,11 +143,12 @@ def compile( # pylint: disable=redefined-builtin
143
143
# https://forum.opencyphal.org/t/nestedrootnamespaceerror-in-basic-usage-demo/794
144
144
raise TypeError (f"Lookup directories shall be an iterable of paths, not { type (lookup_directories ).__name__ } " )
145
145
146
+ output_directory = pathlib .Path (pathlib .Path .cwd () if output_directory is None else output_directory ).resolve ()
147
+
146
148
language_context = nunavut .lang .LanguageContextBuilder ().set_target_language ("py" ).create ()
147
149
148
150
root_namespace_name : str = ""
149
151
composite_types : list [pydsdl .CompositeType ] = []
150
- output_directory = pathlib .Path (pathlib .Path .cwd () if output_directory is None else output_directory ).resolve ()
151
152
152
153
if root_namespace_directory is not None :
153
154
root_namespace_directory = pathlib .Path (root_namespace_directory ).resolve ()
@@ -185,11 +186,10 @@ def compile( # pylint: disable=redefined-builtin
185
186
)
186
187
187
188
lockfile = Locker (
188
- root_namespace_name = root_namespace_name if root_namespace_name else "support " ,
189
+ root_namespace_name = root_namespace_name if root_namespace_name else "_support_ " ,
189
190
output_directory = output_directory ,
190
191
)
191
- lockfile_created = lockfile .create ()
192
- if lockfile_created :
192
+ if lockfile .create ():
193
193
# Generate code
194
194
assert isinstance (output_directory , pathlib .Path )
195
195
code_generator = nunavut .jinja .DSDLCodeGenerator (
You can’t perform that action at this time.
0 commit comments