Skip to content

Commit

Permalink
use python3 version of
Browse files Browse the repository at this point in the history
  • Loading branch information
n8pease committed Sep 14, 2017
1 parent ee03f11 commit 01765e6
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion python/lsst/daf/persistence/access.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class AccessCfg(Policy, yaml.YAMLObject):
yaml_tag = u"!AccessCfg"

def __init__(self, cls, storageCfg):
super(AccessCfg, self).__init__({'storageCfg': storageCfg, 'cls': cls})
super().__init__({'storageCfg': storageCfg, 'cls': cls})


class Access(object):
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/daf/persistence/butler.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class ButlerCfg(Policy, yaml.YAMLObject):
yaml_tag = u"!ButlerCfg"

def __init__(self, cls, repoCfg):
super(ButlerCfg, self).__init__({'repoCfg': repoCfg, 'cls': cls})
super().__init__({'repoCfg': repoCfg, 'cls': cls})


class RepoData(object):
Expand Down
6 changes: 3 additions & 3 deletions python/lsst/daf/persistence/butlerExceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class NoResults(RuntimeError):

def __init__(self, message, datasetType, dataId):
message += ' datasetType:' + datasetType + ' dataId:' + str(dataId)
super(NoResults, self).__init__(message)
super().__init__(message)


class MultipleResults(RuntimeError):
Expand All @@ -39,7 +39,7 @@ def __init__(self, message, datasetType, dataId, locations):
message += ' datasetType:' + datasetType + ' dataId:' + str(dataId) + ' locations:'
for location in locations:
message += ' ' + str(location)
super(MultipleResults, self).__init__(message)
super().__init__(message)
self.locations = locations


Expand All @@ -48,4 +48,4 @@ class ParentsMismatch(RuntimeError):
value.
"""
def __init__(self, message):
super(ParentsMismatch, self).__init__(message)
super().__init__(message)
2 changes: 1 addition & 1 deletion python/lsst/daf/persistence/mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def __new__(cls, *args, **kwargs):
responsibility (except when overriding __new__, but that
is not common).
"""
self = super(Mapper, cls).__new__(cls)
self = super().__new__(cls)
self._arguments = (args, kwargs)
return self

Expand Down
1 change: 0 additions & 1 deletion python/lsst/daf/persistence/registries.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
local filesystem only, so this works for the time being.
"""
from __future__ import absolute_import
from builtins import object, super
from past.builtins import basestring

import copy
Expand Down
4 changes: 2 additions & 2 deletions tests/test_reposInButler.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class MapperTestCfg(Policy, yaml.YAMLObject):
yaml_tag = u"!MapperTestCfg"

def __init__(self, cls, root):
super(MapperTestCfg, self).__init__({'root': root, 'cls': cls})
super().__init__({'root': root, 'cls': cls})


class MapperTest(dp.Mapper):
Expand All @@ -75,7 +75,7 @@ def cfg(cls, root=None):
return MapperTestCfg(cls=cls, root=root)

def __init__(self, cfg):
super(MapperTest, self).__init__()
super().__init__()
# self.root = cfg['root']
self.storage = cfg['storage']
self.cfg = cfg
Expand Down

0 comments on commit 01765e6

Please sign in to comment.