diff --git a/TorrentToMedia.py b/TorrentToMedia.py index 06d36e1a..e3665c5e 100755 --- a/TorrentToMedia.py +++ b/TorrentToMedia.py @@ -1,16 +1,15 @@ #!/usr/bin/env python # coding=utf-8 -import eol -eol.check() - -import cleanup -cleanup.clean(cleanup.FOLDER_STRUCTURE) - import datetime import os import sys +import eol +import cleanup +eol.check() +cleanup.clean(cleanup.FOLDER_STRUCTURE) + import core from core import logger, main_db from core.auto_process import comics, games, movies, music, tv, books @@ -18,7 +17,11 @@ from core.auto_process.common import ProcessResult from core.plugins.plex import plex_update from core.user_scripts import external_script from core.utils import char_replace, convert_to_ascii, replace_links -from six import text_type + +try: + text_type = unicode +except NameError: + text_type = str def process_torrent(input_directory, input_name, input_category, input_hash, input_id, client_agent): @@ -60,13 +63,13 @@ def process_torrent(input_directory, input_name, input_category, input_hash, inp input_category = 'UNCAT' usercat = input_category - #try: + # try: # input_name = input_name.encode(core.SYS_ENCODING) - #except UnicodeError: + # except UnicodeError: # pass - #try: + # try: # input_directory = input_directory.encode(core.SYS_ENCODING) - #except UnicodeError: + # except UnicodeError: # pass logger.debug('Determined Directory: {0} | Name: {1} | Category: {2}'.format @@ -125,9 +128,9 @@ def process_torrent(input_directory, input_name, input_category, input_hash, inp else: output_destination = os.path.normpath( core.os.path.join(core.OUTPUT_DIRECTORY, input_category)) - #try: + # try: # output_destination = output_destination.encode(core.SYS_ENCODING) - #except UnicodeError: + # except UnicodeError: # pass if output_destination in input_directory: @@ -170,9 +173,9 @@ def process_torrent(input_directory, input_name, input_category, input_hash, inp core.os.path.join(output_destination, os.path.basename(file_path)), full_file_name) logger.debug('Setting outputDestination to {0} to preserve folder structure'.format (os.path.dirname(target_file))) - #try: + # try: # target_file = target_file.encode(core.SYS_ENCODING) - #except UnicodeError: + # except UnicodeError: # pass if root == 1: if not found_file: @@ -259,7 +262,6 @@ def process_torrent(input_directory, input_name, input_category, input_hash, inp elif section_name == 'LazyLibrarian': result = books.process(section_name, output_destination, input_name, status, client_agent, input_category) - plex_update(input_category) if result.status_code != 0: @@ -279,7 +281,7 @@ def process_torrent(input_directory, input_name, input_category, input_hash, inp # remove torrent if core.USE_LINK == 'move-sym' and not core.DELETE_ORIGINAL == 1: logger.debug('Checking for sym-links to re-direct in: {0}'.format(input_directory)) - for dirpath, dirs, files in os.walk(input_directory): + for dirpath, _, files in os.walk(input_directory): for file in files: logger.debug('Checking symlink: {0}'.format(os.path.join(dirpath, file))) replace_links(os.path.join(dirpath, file)) @@ -353,14 +355,14 @@ def main(args): if client_agent.lower() not in core.TORRENT_CLIENTS: continue - #try: + # try: # dir_name = dir_name.encode(core.SYS_ENCODING) - #except UnicodeError: + # except UnicodeError: # pass input_name = os.path.basename(dir_name) - #try: + # try: # input_name = input_name.encode(core.SYS_ENCODING) - #except UnicodeError: + # except UnicodeError: # pass results = process_torrent(dir_name, input_name, subsection, input_hash or None, input_id or None, diff --git a/cleanup.py b/cleanup.py index d313f2b4..f0d4e6d1 100644 --- a/cleanup.py +++ b/cleanup.py @@ -25,6 +25,7 @@ FOLDER_STRUCTURE = { class WorkingDirectory(object): """Context manager for changing current working directory.""" + def __init__(self, new, original=None): self.working_directory = new self.original_directory = os.getcwd() if original is None else original @@ -43,7 +44,7 @@ class WorkingDirectory(object): original_directory=self.original_directory, error=error, working_directory=self.working_directory, - ) + ), ) diff --git a/eol.py b/eol.py index a67bfc9e..5504df7e 100644 --- a/eol.py +++ b/eol.py @@ -157,7 +157,7 @@ def print_statuses(show_expired=False): major=python_version[0], minor=python_version[1], remaining=days_left, - ) + ), ) if not show_expired: return @@ -171,7 +171,7 @@ def print_statuses(show_expired=False): major=python_version[0], minor=python_version[1], remaining=-days_left, - ) + ), ) diff --git a/libs/custom/synchronousdeluge/__init__.py b/libs/custom/synchronousdeluge/__init__.py index fbafe6fe..ad90cfe8 100644 --- a/libs/custom/synchronousdeluge/__init__.py +++ b/libs/custom/synchronousdeluge/__init__.py @@ -1,7 +1,8 @@ # coding=utf-8 -"""A synchronous implementation of the Deluge RPC protocol - based on gevent-deluge by Christopher Rosell. - +""" +A synchronous implementation of the Deluge RPC protocol. + +Based on gevent-deluge by Christopher Rosell: https://github.com/chrippa/gevent-deluge Example usage: @@ -18,6 +19,6 @@ Example usage: from .exceptions import DelugeRPCError -__title__ = "synchronous-deluge" -__version__ = "0.1" -__author__ = "Christian Dale" +__title__ = 'synchronous-deluge' +__version__ = '0.1' +__author__ = 'Christian Dale' diff --git a/libs/custom/synchronousdeluge/client.py b/libs/custom/synchronousdeluge/client.py index aa180bf7..9194ebe8 100644 --- a/libs/custom/synchronousdeluge/client.py +++ b/libs/custom/synchronousdeluge/client.py @@ -9,7 +9,7 @@ from .exceptions import DelugeRPCError from .protocol import DelugeRPCRequest, DelugeRPCResponse from .transfer import DelugeTransfer -__all__ = ["DelugeClient"] +__all__ = ['DelugeClient'] RPC_RESPONSE = 1 RPC_ERROR = 2 @@ -18,41 +18,41 @@ RPC_EVENT = 3 class DelugeClient(object): def __init__(self): - """A deluge client session.""" + """Create a deluge client session.""" self.transfer = DelugeTransfer() self.modules = [] self._request_counter = 0 def _get_local_auth(self): - username = password = "" + username = password = '' if platform.system() in ('Windows', 'Microsoft'): - app_data_path = os.environ.get("APPDATA") + app_data_path = os.environ.get('APPDATA') if not app_data_path: from six.moves import winreg hkey = winreg.OpenKey( winreg.HKEY_CURRENT_USER, - "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", + 'Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders', ) - app_data_reg = winreg.QueryValueEx(hkey, "AppData") + app_data_reg = winreg.QueryValueEx(hkey, 'AppData') app_data_path = app_data_reg[0] winreg.CloseKey(hkey) - auth_file = os.path.join(app_data_path, "deluge", "auth") + auth_file = os.path.join(app_data_path, 'deluge', 'auth') else: from xdg.BaseDirectory import save_config_path try: - auth_file = os.path.join(save_config_path("deluge"), "auth") + auth_file = os.path.join(save_config_path('deluge'), 'auth') except OSError: return username, password if os.path.exists(auth_file): for line in open(auth_file): - if line.startswith("#"): + if line.startswith('#'): # This is a comment line continue line = line.strip() try: - lsplit = line.split(":") + lsplit = line.split(':') except Exception: continue @@ -63,13 +63,13 @@ class DelugeClient(object): else: continue - if username == "localclient": + if username == 'localclient': return username, password - return "", "" + return '', '' def _create_module_method(self, module, method): - fullname = "{0}.{1}".format(module, method) + fullname = '{0}.{1}'.format(module, method) def func(obj, *args, **kwargs): return self.remote_call(fullname, *args, **kwargs) @@ -80,18 +80,18 @@ class DelugeClient(object): def _introspect(self): def splitter(value): - return value.split(".") + return value.split('.') self.modules = [] - methods = self.remote_call("daemon.get_method_list").get() + methods = self.remote_call('daemon.get_method_list').get() methodmap = defaultdict(dict) for module, method in imap(splitter, methods): methodmap[module][method] = self._create_module_method(module, method) for module, methods in methodmap.items(): - clsname = "DelugeModule{0}".format(module.capitalize()) + clsname = 'DelugeModule{0}'.format(module.capitalize()) cls = type(clsname, (), methods) setattr(self, module, cls()) self.modules.append(module) @@ -133,24 +133,23 @@ class DelugeClient(object): self._request_counter += 1 return response - def connect(self, host="127.0.0.1", port=58846, username="", password=""): - """Connects to a daemon process. + def connect(self, host='127.0.0.1', port=58846, username='', password=''): + """Connect to a daemon process. :param host: str, the hostname of the daemon :param port: int, the port of the daemon :param username: str, the username to login with :param password: str, the password to login with """ - # Connect transport self.transfer.connect((host, port)) # Attempt to fetch local auth info if needed - if not username and host in ("127.0.0.1", "localhost"): + if not username and host in ('127.0.0.1', 'localhost'): username, password = self._get_local_auth() # Authenticate - self.remote_call("daemon.login", username, password).get() + self.remote_call('daemon.login', username, password).get() # Introspect available methods self._introspect() diff --git a/libs/custom/synchronousdeluge/exceptions.py b/libs/custom/synchronousdeluge/exceptions.py index 6da4bdde..dcb23009 100644 --- a/libs/custom/synchronousdeluge/exceptions.py +++ b/libs/custom/synchronousdeluge/exceptions.py @@ -8,4 +8,4 @@ class DelugeRPCError(Exception): self.traceback = traceback def __str__(self): - return "{0}: {1}: {2}".format(self.__class__.__name__, self.name, self.msg) + return '{0}: {1}: {2}'.format(self.__class__.__name__, self.name, self.msg) diff --git a/libs/custom/synchronousdeluge/transfer.py b/libs/custom/synchronousdeluge/transfer.py index 42863b83..cbf49100 100644 --- a/libs/custom/synchronousdeluge/transfer.py +++ b/libs/custom/synchronousdeluge/transfer.py @@ -6,7 +6,7 @@ import zlib import rencode -__all__ = ["DelugeTransfer"] +__all__ = ['DelugeTransfer'] class DelugeTransfer(object): @@ -33,7 +33,7 @@ class DelugeTransfer(object): payload = zlib.compress(rencode.dumps(data)) self.conn.sendall(payload) - buf = b"" + buf = b'' while True: data = self.conn.recv(1024) diff --git a/libs/custom/utorrent/client.py b/libs/custom/utorrent/client.py index 2be51c6d..ee9ef983 100644 --- a/libs/custom/utorrent/client.py +++ b/libs/custom/utorrent/client.py @@ -31,8 +31,7 @@ class UTorrentClient(object): # TODO refresh token, when necessary def _make_opener(self, realm, base_url, username, password): - """uTorrent API need HTTP Basic Auth and cookie support for token verify.""" - + """HTTP Basic Auth and cookie support for token verification.""" auth_handler = HTTPBasicAuthHandler() auth_handler.add_password(realm=realm, uri=base_url, @@ -61,25 +60,25 @@ class UTorrentClient(object): return self._action(params) def start(self, *hashes): - params = [('action', 'start'), ] + params = [('action', 'start')] for cur_hash in hashes: params.append(('hash', cur_hash)) return self._action(params) def stop(self, *hashes): - params = [('action', 'stop'), ] + params = [('action', 'stop')] for cur_hash in hashes: params.append(('hash', cur_hash)) return self._action(params) def pause(self, *hashes): - params = [('action', 'pause'), ] + params = [('action', 'pause')] for cur_hash in hashes: params.append(('hash', cur_hash)) return self._action(params) def forcestart(self, *hashes): - params = [('action', 'forcestart'), ] + params = [('action', 'forcestart')] for cur_hash in hashes: params.append(('hash', cur_hash)) return self._action(params) @@ -95,8 +94,8 @@ class UTorrentClient(object): def setprops(self, cur_hash, **kvpairs): params = [('action', 'setprops'), ('hash', cur_hash)] for k, v in iteritems(kvpairs): - params.append(("s", k)) - params.append(("v", v)) + params.append(('s', k)) + params.append(('v', v)) return self._action(params) @@ -125,13 +124,13 @@ class UTorrentClient(object): self._action(params) def remove(self, *hashes): - params = [('action', 'remove'), ] + params = [('action', 'remove')] for cur_hash in hashes: params.append(('hash', cur_hash)) return self._action(params) def removedata(self, *hashes): - params = [('action', 'removedata'), ] + params = [('action', 'removedata')] for cur_hash in hashes: params.append(('hash', cur_hash)) return self._action(params) diff --git a/libs/custom/utorrent/upload.py b/libs/custom/utorrent/upload.py index 03d58bcc..1ccbcd37 100644 --- a/libs/custom/utorrent/upload.py +++ b/libs/custom/utorrent/upload.py @@ -36,7 +36,7 @@ class MultiPartForm(object): # Build a list of lists, each containing "lines" of the # request. Each part is separated by a boundary string. # Once the list is built, return a string where each - # line is separated by '\r\n'. + # line is separated by '\r\n'. parts = [] part_boundary = '--' + self.boundary diff --git a/nzbToCouchPotato.py b/nzbToCouchPotato.py index be7fb4f3..9869b0e1 100755 --- a/nzbToCouchPotato.py +++ b/nzbToCouchPotato.py @@ -99,7 +99,7 @@ # # Enter Mount points as LocalPath,RemotePath and separate each pair with '|' # e.g. mountPoints=/volume1/Public/,E:\|/volume2/share/,\\NAS\ -#mountPoints= +#mountPoints= ## Extensions @@ -134,7 +134,7 @@ # subLanguages. # -# subLanguages. create a list of languages in the order you want them in your subtitles. +# subLanguages. create a list of languages in the order you want them in your subtitles. #subLanguages=eng,spa,fra # Transcode (0, 1). @@ -216,7 +216,7 @@ # ffmpeg output settings. #outputVideoExtension=.mp4 #outputVideoCodec=libx264 -#VideoCodecAllow= +#VideoCodecAllow= #outputVideoResolution=720:-1 #outputVideoPreset=medium #outputVideoFramerate=24 @@ -227,7 +227,7 @@ #outputAudioBitrate=640k #outputQualityPercent= #outputAudioTrack2Codec=libfaac -#AudioCodec2Allow= +#AudioCodec2Allow= #outputAudioTrack2Channels=2 #outputAudioTrack2Bitrate=160k #outputAudioOtherCodec=libmp3lame diff --git a/nzbToHeadPhones.py b/nzbToHeadPhones.py index 34103b0c..34fac2e3 100755 --- a/nzbToHeadPhones.py +++ b/nzbToHeadPhones.py @@ -101,7 +101,7 @@ # # Enter Mount points as LocalPath,RemotePath and separate each pair with '|' # e.g. mountPoints=/volume1/Public/,E:\|/volume2/share/,\\NAS\ -#mountPoints= +#mountPoints= ## WakeOnLan diff --git a/nzbToLidarr.py b/nzbToLidarr.py index d8a20dc8..230d8b9d 100755 --- a/nzbToLidarr.py +++ b/nzbToLidarr.py @@ -84,7 +84,7 @@ # # Enter Mount points as LocalPath,RemotePath and separate each pair with '|' # e.g. mountPoints=/volume1/Public/,E:\|/volume2/share/,\\NAS\ -#mountPoints= +#mountPoints= ## Extensions @@ -119,7 +119,7 @@ # subLanguages. # -# subLanguages. create a list of languages in the order you want them in your subtitles. +# subLanguages. create a list of languages in the order you want them in your subtitles. #subLanguages = eng,spa,fra # Transcode (0, 1). @@ -145,7 +145,7 @@ # outputVideoPath. # # outputVideoPath. Set path you want transcoded videos moved to. Leave blank to disable. -#outputVideoPath = +#outputVideoPath = # processOutput (0,1). # @@ -201,20 +201,20 @@ # ffmpeg output settings. #outputVideoExtension=.mp4 #outputVideoCodec=libx264 -#VideoCodecAllow = +#VideoCodecAllow = #outputVideoResolution=720:-1 #outputVideoPreset=medium #outputVideoFramerate=24 #outputVideoBitrate=800k #outputAudioCodec=libmp3lame -#AudioCodecAllow = +#AudioCodecAllow = #outputAudioBitrate=128k #outputQualityPercent = 0 #outputAudioTrack2Codec = libfaac -#AudioCodec2Allow = +#AudioCodec2Allow = #outputAudioTrack2Bitrate = 128k #outputAudioOtherCodec = libmp3lame -#AudioOtherCodecAllow = +#AudioOtherCodecAllow = #outputAudioOtherBitrate = 128k #outputSubtitleCodec = diff --git a/nzbToMedia.py b/nzbToMedia.py index 8d969d6a..1d479d95 100755 --- a/nzbToMedia.py +++ b/nzbToMedia.py @@ -450,7 +450,7 @@ # # Enter Mount points as LocalPath,RemotePath and separate each pair with '|' # e.g. mountPoints=/volume1/Public/,E:\|/volume2/share/,\\NAS\ -#mountPoints= +#mountPoints= ## Extensions @@ -485,7 +485,7 @@ # subLanguages. # -# subLanguages. create a list of languages in the order you want them in your subtitles. +# subLanguages. create a list of languages in the order you want them in your subtitles. #subLanguages=eng,spa,fra # Transcode (0, 1). @@ -567,7 +567,7 @@ # ffmpeg output settings. #outputVideoExtension=.mp4 #outputVideoCodec=libx264 -#VideoCodecAllow= +#VideoCodecAllow= #outputVideoResolution=720:-1 #outputVideoPreset=medium #outputVideoFramerate=24 @@ -578,7 +578,7 @@ #outputAudioBitrate=640k #outputQualityPercent= #outputAudioTrack2Codec=libfaac -#AudioCodec2Allow= +#AudioCodec2Allow= #outputAudioTrack2Channels=2 #outputAudioTrack2Bitrate=160k #outputAudioOtherCodec=libmp3lame @@ -657,16 +657,16 @@ from __future__ import print_function -import eol -eol.check() - -import cleanup -cleanup.clean(cleanup.FOLDER_STRUCTURE) - import datetime import os import sys +import eol +import cleanup + +eol.check() +cleanup.clean(cleanup.FOLDER_STRUCTURE) + import core from core import logger, main_db from core.auto_process import comics, games, movies, music, tv, books diff --git a/nzbToMylar.py b/nzbToMylar.py index 8fe166e3..d16b357a 100755 --- a/nzbToMylar.py +++ b/nzbToMylar.py @@ -92,7 +92,7 @@ # # Enter Mount points as LocalPath,RemotePath and separate each pair with '|' # e.g. mountPoints=/volume1/Public/,E:\|/volume2/share/,\\NAS\ -#mountPoints= +#mountPoints= ## WakeOnLan diff --git a/nzbToNzbDrone.py b/nzbToNzbDrone.py index b7d0ac33..df551472 100755 --- a/nzbToNzbDrone.py +++ b/nzbToNzbDrone.py @@ -89,7 +89,7 @@ # # Enter Mount points as LocalPath,RemotePath and separate each pair with '|' # e.g. mountPoints=/volume1/Public/,E:\|/volume2/share/,\\NAS\ -#mountPoints= +#mountPoints= ## Extensions @@ -124,7 +124,7 @@ # subLanguages. # -# subLanguages. create a list of languages in the order you want them in your subtitles. +# subLanguages. create a list of languages in the order you want them in your subtitles. #subLanguages = eng,spa,fra # Transcode (0, 1). @@ -150,7 +150,7 @@ # outputVideoPath. # # outputVideoPath. Set path you want transcoded videos moved to. Leave blank to disable. -#outputVideoPath = +#outputVideoPath = # processOutput (0,1). # @@ -206,20 +206,20 @@ # ffmpeg output settings. #outputVideoExtension=.mp4 #outputVideoCodec=libx264 -#VideoCodecAllow = +#VideoCodecAllow = #outputVideoResolution=720:-1 #outputVideoPreset=medium #outputVideoFramerate=24 #outputVideoBitrate=800k #outputAudioCodec=libmp3lame -#AudioCodecAllow = +#AudioCodecAllow = #outputAudioBitrate=128k #outputQualityPercent = 0 #outputAudioTrack2Codec = libfaac -#AudioCodec2Allow = +#AudioCodec2Allow = #outputAudioTrack2Bitrate = 128k #outputAudioOtherCodec = libmp3lame -#AudioOtherCodecAllow = +#AudioOtherCodecAllow = #outputAudioOtherBitrate = 128k #outputSubtitleCodec = diff --git a/nzbToRadarr.py b/nzbToRadarr.py index 446585bc..fa2aa26e 100755 --- a/nzbToRadarr.py +++ b/nzbToRadarr.py @@ -94,7 +94,7 @@ # # Enter Mount points as LocalPath,RemotePath and separate each pair with '|' # e.g. mountPoints=/volume1/Public/,E:\|/volume2/share/,\\NAS\ -#mountPoints= +#mountPoints= ## Extensions @@ -129,7 +129,7 @@ # subLanguages. # -# subLanguages. create a list of languages in the order you want them in your subtitles. +# subLanguages. create a list of languages in the order you want them in your subtitles. #subLanguages = eng,spa,fra # Transcode (0, 1). @@ -155,7 +155,7 @@ # outputVideoPath. # # outputVideoPath. Set path you want transcoded videos moved to. Leave blank to disable. -#outputVideoPath = +#outputVideoPath = # processOutput (0,1). # @@ -211,20 +211,20 @@ # ffmpeg output settings. #outputVideoExtension=.mp4 #outputVideoCodec=libx264 -#VideoCodecAllow = +#VideoCodecAllow = #outputVideoResolution=720:-1 #outputVideoPreset=medium #outputVideoFramerate=24 #outputVideoBitrate=800k #outputAudioCodec=libmp3lame -#AudioCodecAllow = +#AudioCodecAllow = #outputAudioBitrate=128k #outputQualityPercent = 0 #outputAudioTrack2Codec = libfaac -#AudioCodec2Allow = +#AudioCodec2Allow = #outputAudioTrack2Bitrate = 128k #outputAudioOtherCodec = libmp3lame -#AudioOtherCodecAllow = +#AudioOtherCodecAllow = #outputAudioOtherBitrate = 128k #outputSubtitleCodec = diff --git a/nzbToSickBeard.py b/nzbToSickBeard.py index 3f1b300d..d342cf0d 100755 --- a/nzbToSickBeard.py +++ b/nzbToSickBeard.py @@ -100,7 +100,7 @@ # # Enter Mount points as LocalPath,RemotePath and separate each pair with '|' # e.g. mountPoints=/volume1/Public/,E:\|/volume2/share/,\\NAS\ -#mountPoints= +#mountPoints= ## Extensions @@ -135,7 +135,7 @@ # subLanguages. # -# subLanguages. create a list of languages in the order you want them in your subtitles. +# subLanguages. create a list of languages in the order you want them in your subtitles. #subLanguages=eng,spa,fra # Transcode (0, 1). @@ -217,7 +217,7 @@ # ffmpeg output settings. #outputVideoExtension=.mp4 #outputVideoCodec=libx264 -#VideoCodecAllow= +#VideoCodecAllow= #outputVideoResolution=720:-1 #outputVideoPreset=medium #outputVideoFramerate=24 @@ -228,7 +228,7 @@ #outputAudioBitrate=640k #outputQualityPercent= #outputAudioTrack2Codec=libfaac -#AudioCodec2Allow= +#AudioCodec2Allow= #outputAudioTrack2Channels=2 #outputAudioTrack2Bitrate=160k #outputAudioOtherCodec=libmp3lame diff --git a/tox.ini b/tox.ini index cf22519c..fd7a997b 100644 --- a/tox.ini +++ b/tox.ini @@ -33,6 +33,15 @@ commands = max-line-length = 79 verbose = 2 statistics = True +exclude = + .github/ + .tox/ + .pytest_cache/ + htmlcov/ + logs/ + libs/common + libs/win + libs/py2 ignore = ; -- flake8 -- ; E501 line too long @@ -57,10 +66,13 @@ ignore = per-file-ignores = ; F401 imported but unused ; E402 module level import not at top of file + nzbTo*.py: E265, E266, E402 + TorrentToMedia.py: E402 core/__init__.py: E402, F401 core/utils/__init__.py: F401 core/plugins/downloaders/configuration.py: F401 core/plugins/downloaders/utils.py: F401 + libs/custom/synchronousdeluge/__init__.py: F401 [testenv:check] deps = @@ -74,13 +86,13 @@ skip_install = true commands = ; ** PRIMARY TESTS ** ; Run flake8 tests (with plugins) using default test selections - flake8 core tests setup.py + flake8 ; ** SELECTIVE TESTS ** ; Run flake8 tests (with plugins) for specific optional codes defined below ; -- flake8-bugbear -- ; B902 Invalid first argument used for instance method. ; B903 Data class should be immutable or use __slots__ to save memory. - flake8 core tests setup.py --select=B902,B903 + flake8 --select=B902,B903 [coverage:run] omit =