mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-08-15 14:43:32 -07:00
Move xmlvalidator code to entity directory
The xmlvalidator logic is only used by the checkrefs.py script, so this moves it to the same directory to have it co-located and avoid having to modify sys.path to import it.
This commit is contained in:
parent
118ea18a58
commit
03cb24d400
5 changed files with 2 additions and 9 deletions
|
|
@ -64,6 +64,3 @@ in particular, let us know and we can try to clarify it.
|
|||
|
||||
webservices
|
||||
MIT / unspecified
|
||||
|
||||
xmlvalidator
|
||||
MIT
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ from struct import calcsize, unpack
|
|||
from xml.etree import ElementTree as ET
|
||||
|
||||
from scriptlib import SimulTemplateEntity, find_files
|
||||
from validate_grammar import RelaxNGValidator
|
||||
from validator import Validator
|
||||
|
||||
|
||||
class SingleLevelFilter(Filter):
|
||||
|
|
@ -151,16 +153,10 @@ class CheckRefs:
|
|||
if args.check_unused:
|
||||
self.check_unused()
|
||||
if args.validate_templates:
|
||||
sys.path.append(str(Path(__file__).parent.parent / "xmlvalidator"))
|
||||
from validate_grammar import RelaxNGValidator
|
||||
|
||||
validate = RelaxNGValidator(self.vfs_root, self.mods)
|
||||
if not validate.run():
|
||||
self.inError = True
|
||||
if args.validate_actors:
|
||||
sys.path.append(str(Path(__file__).parent.parent / "xmlvalidator"))
|
||||
from validator import Validator
|
||||
|
||||
validator = Validator(self.vfs_root, self.mods)
|
||||
if not validator.run():
|
||||
self.inError = True
|
||||
|
|
|
|||
Loading…
Reference in a new issue