From bfb2afcb07765eb7d8d9dababbd8dadbad72acab Mon Sep 17 00:00:00 2001 From: Konstantinos <> Date: Fri, 26 Jul 2019 00:43:56 +0200 Subject: [PATCH] Fix code quality error Try scrutinizer coverage Update README --- .scrutinizer.yml | 2 +- README.rst | 6 +++--- src/music_album_creation/format_classification/dataset.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index aca88ba..5e2cf24 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -24,7 +24,7 @@ build: override: - tox - - command: coverage combine + command: coverage coverage: file: .coverage config_file: '.coveragerc' diff --git a/README.rst b/README.rst index 68edeca..b0ae3b3 100644 --- a/README.rst +++ b/README.rst @@ -37,7 +37,7 @@ Overview :target: https://ci.appveyor.com/project/boromir674/music-album-creator/branch/master .. |coveralls| image:: https://coveralls.io/repos/github/boromir674/music-album-creator/badge.svg?branch=master - :alt: Coverage Status + :alt: Coveralls Coverage Status :target: https://coveralls.io/github/boromir674/music-album-creator?branch=master .. |scrutinizer_code_quality| image:: https://scrutinizer-ci.com/g/boromir674/music-album-creator/badges/quality-score.png?b=master @@ -60,9 +60,9 @@ Overview :alt: Supported versions :target: https://pypi.org/project/music-album-creation -.. |commits_since| image:: https://img.shields.io/github/commits-since/boromir674/music-album-creator/v1.1.0.svg +.. |commits_since| image:: https://img.shields.io/github/commits-since/boromir674/music-album-creator/v1.1.2.svg :alt: Commits since latest release - :target: https://github.com/boromir674/music-album-creator/compare/v1.1.1...master + :target: https://github.com/boromir674/music-album-creator/compare/v1.1.2...master .. |supported-implementations| image:: https://img.shields.io/pypi/implementation/music-album-creator.svg diff --git a/src/music_album_creation/format_classification/dataset.py b/src/music_album_creation/format_classification/dataset.py index bfd7f20..0a6bd95 100644 --- a/src/music_album_creation/format_classification/dataset.py +++ b/src/music_album_creation/format_classification/dataset.py @@ -27,7 +27,7 @@ def __new__(cls, *args, **kwargs): c_globe = glob.glob('{}/*{}'.format(kwargs['datasets_root_dir'], cls.post_fix)) try: cls.__instance._datasets = {re.match(cls.reg, os.path.basename(file)).group(1): file for file in c_globe} - except AttributeError as e: + except AttributeError: raise RuntimeError("Unable to find datasets (txt files) in directory '{}'. Most probably one of [{}] did not match with regex '{}'.".format(dir_requested, ', '.join(str(_) for _ in c_globe), cls.reg)) cls.__instance.datasets_root_dir = kwargs['datasets_root_dir'] return cls.__instance