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
12d9f05b209a
Commit
7cec5700
authored
Apr 30, 2020
by
Laurent Peuch
Browse files
[reader/abbreviations] rename method _load_modnames to _load_module_names
parent
2aac7af21056
Changes
1
Hide whitespace changes
Inline
Side-by-side
yams/reader.py
View file @
12d9f05b
...
...
@@ -169,7 +169,7 @@ class SchemaLoader:
self
.
_load_definition_files
(
module_names
)
# type: ignore # retrocompat situation
else
:
self
.
_load_modnames
(
module_names
)
self
.
_load_mod
ule_
names
(
module_names
)
schema
=
self
.
schema_class
(
name
or
"NoName"
)
# if construction_mode != "strict" handle errors
...
...
@@ -225,7 +225,7 @@ class SchemaLoader:
self
.
handle_file
(
file_path
,
None
)
@
deprecation
.
argument_renamed
(
old_name
=
"modnames"
,
new_name
=
"module_names"
)
def
_load_modnames
(
self
,
module_names
:
Sequence
[
Tuple
[
Any
,
str
]])
->
None
:
def
_load_mod
ule_
names
(
self
,
module_names
:
Sequence
[
Tuple
[
Any
,
str
]])
->
None
:
for
package
,
module_name
in
module_names
:
loader
=
pkgutil
.
find_loader
(
module_name
)
...
...
@@ -246,6 +246,8 @@ class SchemaLoader:
with
tempattr
(
buildobjs
,
"PACKAGE"
,
package
):
self
.
handle_file
(
file_path
,
module_name
=
module_name
)
_load_modnames
=
deprecation
.
renamed
(
old_name
=
"_load_modnames"
,
new_function
=
_load_module_names
)
# has to be overridable sometimes (usually for test purpose)
main_schema_directory
:
str
=
"schema"
...
...
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