reorder attr.ib specs
This commit is contained in:
parent
23581d44bd
commit
fb992a0c81
|
@ -27,6 +27,8 @@ log = logging.getLogger(__name__)
|
||||||
@attr.s
|
@attr.s
|
||||||
class Cache(object):
|
class Cache(object):
|
||||||
|
|
||||||
|
_cachedir = attr.ib(repr=False)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def for_config(cls, config):
|
def for_config(cls, config):
|
||||||
cachedir = cls.cache_dir_from_config(config)
|
cachedir = cls.cache_dir_from_config(config)
|
||||||
|
@ -35,8 +37,6 @@ class Cache(object):
|
||||||
cachedir.mkdir()
|
cachedir.mkdir()
|
||||||
return cls(cachedir)
|
return cls(cachedir)
|
||||||
|
|
||||||
_cachedir = attr.ib(repr=False)
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def cache_dir_from_config(config):
|
def cache_dir_from_config(config):
|
||||||
return paths.resolve_from_str(config.getini("cache_dir"), config.rootdir)
|
return paths.resolve_from_str(config.getini("cache_dir"), config.rootdir)
|
||||||
|
|
Loading…
Reference in New Issue