Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
yams
Commits
629a8d22d29b
Commit
c37badc5
authored
Apr 30, 2020
by
Laurent Peuch
Browse files
[reader/abbreviations] rename defobject function argument to definition_object
parent
12d9f05b209a
Changes
1
Hide whitespace changes
Inline
Side-by-side
yams/reader.py
View file @
629a8d22
...
...
@@ -319,8 +319,9 @@ class SchemaLoader:
pass
@
deprecation
.
argument_renamed
(
old_name
=
"filepath"
,
new_name
=
"file_path"
)
@
deprecation
.
argument_renamed
(
old_name
=
"defobject"
,
new_name
=
"definition_object"
)
def
add_definition
(
self
,
defobject
:
Type
[
buildobjs
.
Definition
],
file_path
:
Optional
[
str
]
=
None
self
,
def
inition_
object
:
Type
[
buildobjs
.
Definition
],
file_path
:
Optional
[
str
]
=
None
)
->
None
:
"""file handler callback to add a definition object
...
...
@@ -328,10 +329,10 @@ class SchemaLoader:
all definition objects (here), then create actual schema objects (done in
`_build_schema`)
"""
if
not
issubclass
(
defobject
,
buildobjs
.
Definition
):
if
not
issubclass
(
def
inition_
object
,
buildobjs
.
Definition
):
raise
BadSchemaDefinition
(
file_path
,
"invalid definition object"
)
defobject
.
expand_type_definitions
(
self
.
defined
)
def
inition_
object
.
expand_type_definitions
(
self
.
defined
)
@
deprecation
.
argument_renamed
(
old_name
=
"filepath"
,
new_name
=
"file_path"
)
@
deprecation
.
argument_renamed
(
old_name
=
"modname"
,
new_name
=
"module_name"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment