Skip to content

Commit

Permalink
Still some exclusions for coverage for non pertinent blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
YuukanOO committed Dec 13, 2018
1 parent 69f3dba commit 546f7a2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions pytlas/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
@click.option('-c', '--cache', type=click.Path(), help='Path to the directory where engine cache will be outputted')
@click.option('-g', '--graph', type=click.Path(), help='Output the transitions graph to the given path')
@write_config
def main():
def main(): # pragma: no cover
"""An open-source 馃 assistant library built for people and made to be super easy to setup and understand.
"""

Expand All @@ -33,7 +33,7 @@ def main():
@click.option('--watch', is_flag=True, help='Reload on skill files change')
@click.argument('training_file', type=click.Path(), nargs=1, required=False)
@write_config
def repl():
def repl(): # pragma: no cover
"""Start a REPL session to interact with your assistant.
"""

Expand All @@ -57,7 +57,7 @@ def repl():
logging.critical('Could not import the "snips" interpreter, is "snips-nlu" installed?')

@main.group()
def skills():
def skills(): # pragma: no cover
"""Manage skills for this pytlas instance.
Under the hood, it uses git to clone and update skills so it must be installed and available in your path.
Expand All @@ -66,7 +66,7 @@ def skills():
pass

@skills.command('list')
def list_skills():
def list_skills(): # pragma: no cover
"""List installed skills for this instance.
"""

Expand All @@ -77,23 +77,23 @@ def list_skills():

@skills.command('add')
@click.argument('skills', nargs=-1, required=True)
def add_skills(skills):
def add_skills(skills): # pragma: no cover
"""Add given skills to your instance.
"""

install_skills(get(OPT_SKILLS), click.echo, *skills)

@skills.command('update')
@click.argument('skills', nargs=-1)
def update_skills_command(skills):
def update_skills_command(skills): # pragma: no cover
"""Update given skills for this instance. If no skills are defined, they will be all updated.
"""

update_skills(get(OPT_SKILLS), click.echo, *skills)

@skills.command('remove')
@click.argument('skills', nargs=-1, required=True)
def remove_skills(skills):
def remove_skills(skills): # pragma: no cover
"""Remove given skills from your instance.
"""

Expand Down
2 changes: 1 addition & 1 deletion pytlas/cli/prompt.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from pytlas.version import __version__
import cmd, sys

class Prompt(cmd.Cmd):
class Prompt(cmd.Cmd): # pragma: no cover
intro = 'pytlas prompt v%s (type exit to leave)' % __version__
prompt = '> '

Expand Down
4 changes: 2 additions & 2 deletions pytlas/cli/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from colorlog import ColoredFormatter, escape_codes
import re, logging

class CustomFormatter(ColoredFormatter):
class CustomFormatter(ColoredFormatter): # pragma: no cover
"""Custom formatter used to highlight every words wrapped in quotes.
"""

Expand All @@ -21,7 +21,7 @@ def format(self, record):

return self._pattern.sub(r'%s\1%s' % (escape_codes['cyan'], escape_codes['reset']), msg) + escape_codes['reset']

def install_logs(verbose, debug=False):
def install_logs(verbose, debug=False): # pragma: no cover
"""Install a custom colored formatter in the root logger.
Args:
Expand Down
2 changes: 1 addition & 1 deletion pytlas/importers.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def import_or_reload(module_name):
except ImportError:
logging.error ('Could not import module "%s"' % module_name)

def _watch(directory):
def _watch(directory): # pragma: no cover
try:
from watchgod import watch
except ImportError:
Expand Down

0 comments on commit 546f7a2

Please sign in to comment.