rana-cli/wakatime/projects/base.py

44 lines
943 B
Python
Raw Normal View History

2013-07-06 07:51:09 +00:00
# -*- coding: utf-8 -*-
"""
wakatime.projects.base
~~~~~~~~~~~~~~~~~~~~~~
Base project for use when no other project can be found.
:copyright: (c) 2013 Alan Hamlett.
:license: BSD, see LICENSE for more details.
"""
import logging
log = logging.getLogger('WakaTime')
2013-07-06 07:51:09 +00:00
class BaseProject(object):
""" Parent project class only
used when no valid project can
be found for the current path.
"""
2013-07-06 07:51:09 +00:00
def __init__(self, path, configs=None):
2013-07-06 07:51:09 +00:00
self.path = path
self._configs = configs
2013-07-06 07:51:09 +00:00
def process(self):
""" Processes self.path into a project and
returns True if project is valid, otherwise
returns False.
"""
2015-09-08 03:43:06 +00:00
return False # pragma: nocover
def name(self):
""" Returns the project's name.
"""
2013-07-06 07:51:09 +00:00
return None
2013-08-15 07:09:27 +00:00
def branch(self):
""" Returns the current branch.
"""
2015-09-08 03:43:06 +00:00
return None # pragma: nocover