[game-data-packager] 01/06: Rename to_yaml to to_data

Simon McVittie smcv at debian.org
Mon Jan 25 10:26:29 UTC 2016


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch master
in repository game-data-packager.

commit f1e04ac3998c9ca331398c930330e97c359f71ad
Author: Simon McVittie <smcv at debian.org>
Date:   Mon Jan 25 08:14:33 2016 +0000

    Rename to_yaml to to_data
    
    It has never actually produced YAML.
---
 game_data_packager/__init__.py | 10 +++++-----
 game_data_packager/build.py    |  4 ++--
 game_data_packager/data.py     |  2 +-
 tools/check_equivalence.py     |  8 ++++----
 tools/check_syntax.py          |  2 +-
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index 96d14a5..3b3a009 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -230,7 +230,7 @@ class GameDataPackage(object):
         assert type(value) is str
         self.langs = [value]
 
-    def to_yaml(self, expand=True):
+    def to_data(self, expand=True):
         ret = {
             'architecture': self.architecture,
             'component': self.component,
@@ -591,7 +591,7 @@ class GameData(object):
 
         return help_text
 
-    def to_yaml(self, expand=True):
+    def to_data(self, expand=True):
         files = {}
         groups = {}
         packages = {}
@@ -606,12 +606,12 @@ class GameData(object):
 
         for filename, f in self.files.items():
             if f.group_members is not None:
-                groups[filename] = f.to_yaml(expand=expand)
+                groups[filename] = f.to_data(expand=expand)
             else:
-                files[filename] = f.to_yaml(expand=expand)
+                files[filename] = f.to_data(expand=expand)
 
         for name, package in self.packages.items():
-            packages[name] = package.to_yaml(expand=expand)
+            packages[name] = package.to_data(expand=expand)
 
         if files:
             ret['files'] = files
diff --git a/game_data_packager/build.py b/game_data_packager/build.py
index 7180e5c..71caf4b 100644
--- a/game_data_packager/build.py
+++ b/game_data_packager/build.py
@@ -1941,9 +1941,9 @@ class PackagingTask(object):
     def run_command_line(self, args):
         if logging.getLogger().isEnabledFor(logging.DEBUG):
             logger.debug('package description:\n%s',
-                    yaml.safe_dump(self.game.to_yaml(expand=False)))
+                    yaml.safe_dump(self.game.to_data(expand=False)))
             logger.debug('package description after expansion:\n%s',
-                    yaml.safe_dump(self.game.to_yaml(expand=True)))
+                    yaml.safe_dump(self.game.to_data(expand=True)))
 
         self.verbose = getattr(args, 'verbose', False)
 
diff --git a/game_data_packager/data.py b/game_data_packager/data.py
index 12fba35..7fb2ee3 100644
--- a/game_data_packager/data.py
+++ b/game_data_packager/data.py
@@ -236,7 +236,7 @@ class WantedFile(HashedFile):
     def provides(self, value):
         self._provides = set(value)
 
-    def to_yaml(self, expand=True):
+    def to_data(self, expand=True):
         ret = {
             'name': self.name,
         }
diff --git a/tools/check_equivalence.py b/tools/check_equivalence.py
index 4826d41..d698741 100755
--- a/tools/check_equivalence.py
+++ b/tools/check_equivalence.py
@@ -76,15 +76,15 @@ if __name__ == '__main__':
         game.load_file_data()
         ascii_safe(game.longname, force=True).encode('ascii')
         ascii_safe(game.help_text, force=True).encode('ascii')
-        vfs_to_json = dump(game.to_yaml())
+        vfs_to_json = dump(game.to_data())
 
         json_game = from_json[name]
         json_game.load_file_data()
-        json_to_json = dump(json_game.to_yaml())
+        json_to_json = dump(json_game.to_data())
 
         yaml_game = from_yaml[name]
         yaml_game.load_file_data()
-        yaml_to_json = dump(yaml_game.to_yaml())
+        yaml_to_json = dump(yaml_game.to_data())
 
         if yaml_to_json != vfs_to_json:
             sys.stdout.writelines(difflib.unified_diff(
@@ -105,7 +105,7 @@ if __name__ == '__main__':
         if from_ref is not None:
             ref_game = from_ref[name]
             ref_game.load_file_data(use_vfs='ref.zip')
-            ref_to_json = dump(ref_game.to_yaml())
+            ref_to_json = dump(ref_game.to_data())
 
             if ref_to_json != vfs_to_json:
                 sys.stdout.writelines(difflib.unified_diff(
diff --git a/tools/check_syntax.py b/tools/check_syntax.py
index 6c8e230..21f0838 100755
--- a/tools/check_syntax.py
+++ b/tools/check_syntax.py
@@ -34,4 +34,4 @@ if __name__ == '__main__':
         ascii_safe(game.help_text, force=True).encode('ascii')
         if 'DEBUG' in os.environ or 'GDP_DEBUG' in os.environ:
             print('# %s -----------------------------------------' % name)
-            print(yaml.safe_dump(game.to_yaml()))
+            print(yaml.safe_dump(game.to_data()))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git



More information about the Pkg-games-commits mailing list