diff --git a/platformio/account/client.py b/platformio/account/client.py index 7aabb24d..366e4ad5 100644 --- a/platformio/account/client.py +++ b/platformio/account/client.py @@ -21,22 +21,18 @@ from platformio.http import HTTPClient, HTTPClientError class AccountError(PlatformioException): - MESSAGE = "{0}" class AccountNotAuthorized(AccountError): - MESSAGE = "You are not authorized! Please log in to PlatformIO Account." class AccountAlreadyAuthorized(AccountError): - MESSAGE = "You are already authorized with {0} account." class AccountClient(HTTPClient): # pylint:disable=too-many-public-methods - SUMMARY_CACHE_TTL = 60 * 60 * 24 * 7 def __init__(self): diff --git a/platformio/builder/tools/pioino.py b/platformio/builder/tools/pioino.py index 57b86500..c44e72b7 100644 --- a/platformio/builder/tools/pioino.py +++ b/platformio/builder/tools/pioino.py @@ -25,7 +25,6 @@ from platformio.compat import get_filesystem_encoding, get_locale_encoding class InoToCPPConverter: - PROTOTYPE_RE = re.compile( r"""^( (?:template\<.*\>\s*)? # template diff --git a/platformio/builder/tools/piolib.py b/platformio/builder/tools/piolib.py index c0e2be59..f95f6735 100644 --- a/platformio/builder/tools/piolib.py +++ b/platformio/builder/tools/piolib.py @@ -109,7 +109,6 @@ class LibBuilderFactory: class LibBuilderBase: - CLASSIC_SCANNER = SCons.Scanner.C.CScanner() CCONDITIONAL_SCANNER = SCons.Scanner.C.CConditionalScanner() # Max depth of nested includes: diff --git a/platformio/check/defect.py b/platformio/check/defect.py index 9efcad90..5689a184 100644 --- a/platformio/check/defect.py +++ b/platformio/check/defect.py @@ -24,7 +24,6 @@ from platformio.project.helpers import get_project_dir class DefectItem: - SEVERITY_HIGH = 1 SEVERITY_MEDIUM = 2 SEVERITY_LOW = 4 diff --git a/platformio/cli.py b/platformio/cli.py index bdb46a3d..41aab522 100644 --- a/platformio/cli.py +++ b/platformio/cli.py @@ -19,7 +19,6 @@ import click class PlatformioCLI(click.MultiCommand): - leftover_args = [] def __init__(self, *args, **kwargs): diff --git a/platformio/commands/boards.py b/platformio/commands/boards.py index 8ca008f1..ac8367da 100644 --- a/platformio/commands/boards.py +++ b/platformio/commands/boards.py @@ -42,7 +42,7 @@ def cli(query, installed, json_output): # pylint: disable=R0912 grpboards[board["platform"]].append(board) terminal_width = shutil.get_terminal_size().columns - for (platform, boards) in sorted(grpboards.items()): + for platform, boards in sorted(grpboards.items()): click.echo("") click.echo("Platform: ", nl=False) click.secho(platform, bold=True) diff --git a/platformio/debug/config/blackmagic.py b/platformio/debug/config/blackmagic.py index 83d98d9c..370fdb7e 100644 --- a/platformio/debug/config/blackmagic.py +++ b/platformio/debug/config/blackmagic.py @@ -18,7 +18,6 @@ from platformio.device.finder import SerialPortFinder, is_pattern_port class BlackmagicDebugConfig(DebugConfigBase): - GDB_INIT_SCRIPT = """ define pio_reset_halt_target set language c diff --git a/platformio/debug/config/generic.py b/platformio/debug/config/generic.py index 1f155ecb..faa5a341 100644 --- a/platformio/debug/config/generic.py +++ b/platformio/debug/config/generic.py @@ -16,7 +16,6 @@ from platformio.debug.config.base import DebugConfigBase class GenericDebugConfig(DebugConfigBase): - GDB_INIT_SCRIPT = """ define pio_reset_halt_target monitor reset halt diff --git a/platformio/debug/config/jlink.py b/platformio/debug/config/jlink.py index 03a1bd3a..a820e0aa 100644 --- a/platformio/debug/config/jlink.py +++ b/platformio/debug/config/jlink.py @@ -16,7 +16,6 @@ from platformio.debug.config.base import DebugConfigBase class JlinkDebugConfig(DebugConfigBase): - GDB_INIT_SCRIPT = """ define pio_reset_halt_target monitor reset diff --git a/platformio/debug/config/mspdebug.py b/platformio/debug/config/mspdebug.py index 09266b3b..7f4d8e1a 100644 --- a/platformio/debug/config/mspdebug.py +++ b/platformio/debug/config/mspdebug.py @@ -16,7 +16,6 @@ from platformio.debug.config.base import DebugConfigBase class MspdebugDebugConfig(DebugConfigBase): - GDB_INIT_SCRIPT = """ define pio_reset_halt_target end diff --git a/platformio/debug/config/native.py b/platformio/debug/config/native.py index be15b5f4..413a9c62 100644 --- a/platformio/debug/config/native.py +++ b/platformio/debug/config/native.py @@ -17,7 +17,6 @@ from platformio.debug.config.base import DebugConfigBase class NativeDebugConfig(DebugConfigBase): - GDB_INIT_SCRIPT = """ define pio_reset_halt_target end diff --git a/platformio/debug/config/qemu.py b/platformio/debug/config/qemu.py index e9a57409..b998c782 100644 --- a/platformio/debug/config/qemu.py +++ b/platformio/debug/config/qemu.py @@ -16,7 +16,6 @@ from platformio.debug.config.base import DebugConfigBase class QemuDebugConfig(DebugConfigBase): - GDB_INIT_SCRIPT = """ define pio_reset_halt_target monitor system_reset diff --git a/platformio/debug/config/renode.py b/platformio/debug/config/renode.py index 724be407..f2f62d66 100644 --- a/platformio/debug/config/renode.py +++ b/platformio/debug/config/renode.py @@ -16,7 +16,6 @@ from platformio.debug.config.base import DebugConfigBase class RenodeDebugConfig(DebugConfigBase): - GDB_INIT_SCRIPT = """ define pio_reset_halt_target monitor machine Reset diff --git a/platformio/debug/exception.py b/platformio/debug/exception.py index a1269b2f..7f4d0f4c 100644 --- a/platformio/debug/exception.py +++ b/platformio/debug/exception.py @@ -20,7 +20,6 @@ class DebugError(PlatformioException): class DebugSupportError(DebugError, UserSideException): - MESSAGE = ( "Currently, PlatformIO does not support debugging for `{0}`.\n" "Please request support at https://github.com/platformio/" diff --git a/platformio/debug/helpers.py b/platformio/debug/helpers.py index a2d89de3..23f4fff0 100644 --- a/platformio/debug/helpers.py +++ b/platformio/debug/helpers.py @@ -31,7 +31,6 @@ from platformio.test.runners.factory import TestRunnerFactory class GDBMIConsoleStream(BytesIO): # pylint: disable=too-few-public-methods - STDOUT = sys.stdout def write(self, text): diff --git a/platformio/debug/process/base.py b/platformio/debug/process/base.py index 2c9280c2..6ba8c70e 100644 --- a/platformio/debug/process/base.py +++ b/platformio/debug/process/base.py @@ -53,7 +53,6 @@ class DebugSubprocessProtocol(asyncio.SubprocessProtocol): class DebugBaseProcess: - STDOUT_CHUNK_SIZE = 2048 LOG_FILE = None diff --git a/platformio/debug/process/gdb.py b/platformio/debug/process/gdb.py index 4ce9aebe..ce7e82c8 100644 --- a/platformio/debug/process/gdb.py +++ b/platformio/debug/process/gdb.py @@ -24,7 +24,6 @@ from platformio.debug.process.client import DebugClientProcess class GDBClientProcess(DebugClientProcess): - PIO_SRC_NAME = ".pioinit" INIT_COMPLETED_BANNER = "PlatformIO: Initialization completed" diff --git a/platformio/debug/process/server.py b/platformio/debug/process/server.py index 89b4095f..693dfa44 100644 --- a/platformio/debug/process/server.py +++ b/platformio/debug/process/server.py @@ -26,7 +26,6 @@ from platformio.proc import where_is_program class DebugServerProcess(DebugBaseProcess): - STD_BUFFER_SIZE = 1024 def __init__(self, debug_config): diff --git a/platformio/exception.py b/platformio/exception.py index a8287c04..c9afd751 100644 --- a/platformio/exception.py +++ b/platformio/exception.py @@ -14,7 +14,6 @@ class PlatformioException(Exception): - MESSAGE = None def __str__(self): # pragma: no cover @@ -26,7 +25,6 @@ class PlatformioException(Exception): class ReturnErrorCode(PlatformioException): - MESSAGE = "{0}" @@ -35,7 +33,6 @@ class UserSideException(PlatformioException): class AbortedByUser(UserSideException): - MESSAGE = "Aborted by user" @@ -49,7 +46,6 @@ class InvalidUdevRules(UserSideException): class MissedUdevRules(InvalidUdevRules): - MESSAGE = ( "Warning! Please install `99-platformio-udev.rules`. \nMore details: " "https://docs.platformio.org/en/latest/core/installation/udev-rules.html" @@ -57,7 +53,6 @@ class MissedUdevRules(InvalidUdevRules): class OutdatedUdevRules(InvalidUdevRules): - MESSAGE = ( "Warning! Your `{0}` are outdated. Please update or reinstall them." "\nMore details: " @@ -71,32 +66,26 @@ class OutdatedUdevRules(InvalidUdevRules): class GetSerialPortsError(PlatformioException): - MESSAGE = "No implementation for your platform ('{0}') available" class GetLatestVersionError(PlatformioException): - MESSAGE = "Can not retrieve the latest PlatformIO version" class InvalidSettingName(UserSideException): - MESSAGE = "Invalid setting with the name '{0}'" class InvalidSettingValue(UserSideException): - MESSAGE = "Invalid value '{0}' for the setting '{1}'" class InvalidJSONFile(PlatformioException): - MESSAGE = "Could not load broken JSON: {0}" class CIBuildEnvsEmpty(UserSideException): - MESSAGE = ( "Can't find PlatformIO build environments.\n" "Please specify `--board` or path to `platformio.ini` with " @@ -105,7 +94,6 @@ class CIBuildEnvsEmpty(UserSideException): class UpgradeError(PlatformioException): - MESSAGE = """{0} * Upgrade using `pip install -U platformio` @@ -115,7 +103,6 @@ class UpgradeError(PlatformioException): class HomeDirPermissionsError(UserSideException): - MESSAGE = ( "The directory `{0}` or its parent directory is not owned by the " "current user and PlatformIO can not store configuration data.\n" @@ -126,7 +113,6 @@ class HomeDirPermissionsError(UserSideException): class CygwinEnvDetected(PlatformioException): - MESSAGE = ( "PlatformIO does not work within Cygwin environment. " "Use native Terminal instead." diff --git a/platformio/fs.py b/platformio/fs.py index bd17950b..00055299 100644 --- a/platformio/fs.py +++ b/platformio/fs.py @@ -181,7 +181,7 @@ def match_src_files(src_dir, src_filter=None, src_exts=None, followlinks=True): result = set() # correct fs directory separator src_filter = src_filter.replace("/", os.sep).replace("\\", os.sep) - for (action, pattern) in re.findall(r"(\+|\-)<([^>]+)>", src_filter): + for action, pattern in re.findall(r"(\+|\-)<([^>]+)>", src_filter): candidates = _find_candidates(pattern) if action == "+": result |= candidates diff --git a/platformio/home/rpc/handlers/app.py b/platformio/home/rpc/handlers/app.py index 9d7fc590..dbeafbdb 100644 --- a/platformio/home/rpc/handlers/app.py +++ b/platformio/home/rpc/handlers/app.py @@ -21,7 +21,6 @@ from platformio.project.helpers import is_platformio_project class AppRPC: - IGNORE_STORAGE_KEYS = [ "cid", "coreVersion", diff --git a/platformio/home/rpc/handlers/ide.py b/platformio/home/rpc/handlers/ide.py index 5ff9fe33..d08a8215 100644 --- a/platformio/home/rpc/handlers/ide.py +++ b/platformio/home/rpc/handlers/ide.py @@ -21,7 +21,6 @@ from platformio.compat import aio_get_running_loop class IDERPC: - COMMAND_TIMEOUT = 1.5 # in seconds def __init__(self): diff --git a/platformio/home/rpc/handlers/piocore.py b/platformio/home/rpc/handlers/piocore.py index 99a5325e..0917a5f4 100644 --- a/platformio/home/rpc/handlers/piocore.py +++ b/platformio/home/rpc/handlers/piocore.py @@ -24,8 +24,8 @@ from starlette.concurrency import run_in_threadpool from platformio import __main__, __version__, fs, proc from platformio.compat import get_locale_encoding, is_bytes -from platformio.home import helpers from platformio.exception import PlatformioException +from platformio.home import helpers class MultiThreadingStdStream: diff --git a/platformio/home/rpc/server.py b/platformio/home/rpc/server.py index 6c0abdb4..88f06704 100644 --- a/platformio/home/rpc/server.py +++ b/platformio/home/rpc/server.py @@ -24,7 +24,6 @@ from platformio.proc import force_exit class JSONRPCServerFactoryBase: - connection_nums = 0 shutdown_timer = None diff --git a/platformio/http.py b/platformio/http.py index 501d1078..48235f74 100644 --- a/platformio/http.py +++ b/platformio/http.py @@ -38,7 +38,6 @@ class HTTPClientError(PlatformioException): class InternetConnectionError(UserSideException): - MESSAGE = ( "You are not connected to the Internet.\n" "PlatformIO needs the Internet connection to" diff --git a/platformio/package/commands/list.py b/platformio/package/commands/list.py index 9d538b7d..dfd2559f 100644 --- a/platformio/package/commands/list.py +++ b/platformio/package/commands/list.py @@ -137,7 +137,7 @@ def list_global_packages(options): only_packages = any( options.get(type_) or options.get(f"only_{type_}") for (type_, _) in data ) - for (type_, pm) in data: + for type_, pm in data: skip_conds = [ only_packages and not options.get(type_) diff --git a/platformio/package/exception.py b/platformio/package/exception.py index 580137a0..d38c0e60 100644 --- a/platformio/package/exception.py +++ b/platformio/package/exception.py @@ -48,12 +48,10 @@ class ManifestValidationError(ManifestException): class MissingPackageManifestError(ManifestException): - MESSAGE = "Could not find one of '{0}' manifest files in the package" class UnknownPackageError(UserSideException): - MESSAGE = ( "Could not find the package with '{0}' requirements for your system '%s'" % util.get_systype() @@ -61,7 +59,6 @@ class UnknownPackageError(UserSideException): class NotGlobalLibDir(UserSideException): - MESSAGE = ( "The `{0}` is not a PlatformIO project.\n\n" "To manage libraries in global storage `{1}`,\n" diff --git a/platformio/package/manager/_download.py b/platformio/package/manager/_download.py index 9d9c6118..d1ffe710 100644 --- a/platformio/package/manager/_download.py +++ b/platformio/package/manager/_download.py @@ -26,7 +26,6 @@ from platformio.package.lockfile import LockFile class PackageManagerDownloadMixin: - DOWNLOAD_CACHE_EXPIRE = 86400 * 30 # keep package in a local cache for 1 month def compute_download_path(self, *args): diff --git a/platformio/package/manager/_install.py b/platformio/package/manager/_install.py index c89d7b86..fc4d5ddb 100644 --- a/platformio/package/manager/_install.py +++ b/platformio/package/manager/_install.py @@ -27,7 +27,6 @@ from platformio.package.vcsclient import VCSClientFactory class PackageManagerInstallMixin: - _INSTALL_HISTORY = None # avoid circle dependencies @staticmethod diff --git a/platformio/package/meta.py b/platformio/package/meta.py index fbd2b734..4db53106 100644 --- a/platformio/package/meta.py +++ b/platformio/package/meta.py @@ -65,7 +65,6 @@ class PackageType: class PackageCompatibility: - KNOWN_QUALIFIERS = ("platforms", "frameworks", "authors") @classmethod @@ -468,7 +467,6 @@ class PackageMetaData: class PackageItem: - METAFILE_NAME = ".piopm" def __init__(self, path, metadata=None): diff --git a/platformio/package/unpack.py b/platformio/package/unpack.py index e39222c2..35e0da68 100644 --- a/platformio/package/unpack.py +++ b/platformio/package/unpack.py @@ -24,7 +24,6 @@ from platformio.package.exception import PackageException class ExtractArchiveItemError(PackageException): - MESSAGE = ( "Could not extract `{0}` to `{1}`. Try to disable antivirus " "tool or check this solution -> https://bit.ly/faq-package-manager" diff --git a/platformio/package/vcsclient.py b/platformio/package/vcsclient.py index b4dafc03..058a4983 100644 --- a/platformio/package/vcsclient.py +++ b/platformio/package/vcsclient.py @@ -58,7 +58,6 @@ class VCSClientFactory: class VCSClientBase: - command = None def __init__(self, src_dir, remote_url=None, tag=None, silent=False): @@ -128,7 +127,6 @@ class VCSClientBase: class GitClient(VCSClientBase): - command = "git" _configured = False @@ -232,7 +230,6 @@ class GitClient(VCSClientBase): class HgClient(VCSClientBase): - command = "hg" def export(self): @@ -256,7 +253,6 @@ class HgClient(VCSClientBase): class SvnClient(VCSClientBase): - command = "svn" def export(self): diff --git a/platformio/platform/_run.py b/platformio/platform/_run.py index 91c90931..0c157f85 100644 --- a/platformio/platform/_run.py +++ b/platformio/platform/_run.py @@ -28,7 +28,6 @@ from platformio.platform.exception import BuildScriptNotFound class PlatformRunMixin: - LINE_ERROR_RE = re.compile(r"(^|\s+)error:?\s+", re.I) @staticmethod diff --git a/platformio/platform/base.py b/platformio/platform/base.py index 49db0df4..23a66929 100644 --- a/platformio/platform/base.py +++ b/platformio/platform/base.py @@ -29,7 +29,6 @@ from platformio.project.config import ProjectConfig class PlatformBase( # pylint: disable=too-many-instance-attributes,too-many-public-methods PlatformPackagesMixin, PlatformRunMixin ): - CORE_SEMVER = pepver_to_semver(__version__) _BOARDS_CACHE = {} diff --git a/platformio/platform/exception.py b/platformio/platform/exception.py index 604c3228..f044d3b7 100644 --- a/platformio/platform/exception.py +++ b/platformio/platform/exception.py @@ -20,12 +20,10 @@ class PlatformException(PlatformioException): class UnknownPlatform(PlatformException): - MESSAGE = "Unknown development platform '{0}'" class IncompatiblePlatform(PlatformException): - MESSAGE = ( "Development platform '{0}' is not compatible with PlatformIO Core v{1} and " "depends on PlatformIO Core {2}.\n" @@ -33,20 +31,16 @@ class IncompatiblePlatform(PlatformException): class UnknownBoard(PlatformException): - MESSAGE = "Unknown board ID '{0}'" class InvalidBoardManifest(PlatformException): - MESSAGE = "Invalid board JSON manifest '{0}'" class UnknownFramework(PlatformException): - MESSAGE = "Unknown framework '{0}'" class BuildScriptNotFound(PlatformException): - MESSAGE = "Invalid path '{0}' to build script" diff --git a/platformio/project/commands/init.py b/platformio/project/commands/init.py index ca57de34..6a545df4 100644 --- a/platformio/project/commands/init.py +++ b/platformio/project/commands/init.py @@ -166,7 +166,7 @@ def init_base_project(project_dir): (config.get("platformio", "lib_dir"), init_lib_readme), (config.get("platformio", "test_dir"), init_test_readme), ] - for (path, cb) in dir_to_readme: + for path, cb in dir_to_readme: if os.path.isdir(path): continue os.makedirs(path) diff --git a/platformio/project/config.py b/platformio/project/config.py index ee380bb9..43d15f3e 100644 --- a/platformio/project/config.py +++ b/platformio/project/config.py @@ -39,7 +39,6 @@ CONFIG_HEADER = """ class ProjectConfigBase: - INLINE_COMMENT_RE = re.compile(r"\s+;.*$") VARTPL_RE = re.compile(r"\$\{([^\.\}\()]+)\.([^\}]+)\}") @@ -412,7 +411,6 @@ class ProjectConfigDirsMixin: class ProjectConfig(ProjectConfigBase, ProjectConfigDirsMixin): - _instances = {} @staticmethod diff --git a/platformio/project/exception.py b/platformio/project/exception.py index aa45eb07..8e598e03 100644 --- a/platformio/project/exception.py +++ b/platformio/project/exception.py @@ -20,7 +20,6 @@ class ProjectError(PlatformioException): class NotPlatformIOProjectError(ProjectError, UserSideException): - MESSAGE = ( "Not a PlatformIO project. `platformio.ini` file has not been " "found in current working directory ({0}). To initialize new project " @@ -29,25 +28,20 @@ class NotPlatformIOProjectError(ProjectError, UserSideException): class InvalidProjectConfError(ProjectError, UserSideException): - MESSAGE = "Invalid '{0}' (project configuration file): '{1}'" class UndefinedEnvPlatformError(ProjectError, UserSideException): - MESSAGE = "Please specify platform for '{0}' environment" class ProjectEnvsNotAvailableError(ProjectError, UserSideException): - MESSAGE = "Please setup environments in `platformio.ini` file" class UnknownEnvNamesError(ProjectError, UserSideException): - MESSAGE = "Unknown environment names '{0}'. Valid names are '{1}'" class ProjectOptionValueError(ProjectError, UserSideException): - MESSAGE = "{0} for option `{1}` in section [{2}]" diff --git a/platformio/registry/mirror.py b/platformio/registry/mirror.py index 4235e88d..4b4508f6 100644 --- a/platformio/registry/mirror.py +++ b/platformio/registry/mirror.py @@ -22,7 +22,6 @@ from platformio.registry.client import RegistryClient class RegistryFileMirrorIterator: - HTTP_CLIENT_INSTANCES = {} def __init__(self, download_url): diff --git a/platformio/remote/ac/base.py b/platformio/remote/ac/base.py index 8105062c..0c631c64 100644 --- a/platformio/remote/ac/base.py +++ b/platformio/remote/ac/base.py @@ -17,7 +17,6 @@ from twisted.spread import pb # pylint: disable=import-error class AsyncCommandBase: - MAX_BUFFER_SIZE = 1024 * 1024 # 1Mb def __init__(self, options=None, on_end_callback=None): diff --git a/platformio/remote/cli.py b/platformio/remote/cli.py index bede41d1..91f5e29d 100644 --- a/platformio/remote/cli.py +++ b/platformio/remote/cli.py @@ -118,7 +118,6 @@ def remote_run( silent, verbose, ): - from platformio.remote.client.run_or_test import RunOrTestClient cr = RunOrTestClient( @@ -211,7 +210,6 @@ def remote_test( # pylint: disable=redefined-builtin without_uploading, verbose, ): - from platformio.remote.client.run_or_test import RunOrTestClient cr = RunOrTestClient( diff --git a/platformio/remote/client/async_base.py b/platformio/remote/client/async_base.py index 488802a5..2a672641 100644 --- a/platformio/remote/client/async_base.py +++ b/platformio/remote/client/async_base.py @@ -34,7 +34,7 @@ class AsyncClientBase(RemoteClientBase): def cb_async_result(self, result): if self._acs_total == 0: self._acs_total = len(result) - for (success, value) in result: + for success, value in result: if not success: raise pb.Error(value) self.acread_data(*value) diff --git a/platformio/remote/client/base.py b/platformio/remote/client/base.py index fe2c4fb4..cf5c2405 100644 --- a/platformio/remote/client/base.py +++ b/platformio/remote/client/base.py @@ -33,7 +33,6 @@ from platformio.remote.factory.ssl import SSLContextFactory class RemoteClientBase( # pylint: disable=too-many-instance-attributes pb.Referenceable ): - PING_DELAY = 60 PING_MAX_FAILURES = 3 DEBUG = False diff --git a/platformio/remote/client/device_list.py b/platformio/remote/client/device_list.py index a22911b4..f05bbfd2 100644 --- a/platformio/remote/client/device_list.py +++ b/platformio/remote/client/device_list.py @@ -32,7 +32,7 @@ class DeviceListClient(RemoteClientBase): def _cbResult(self, result): data = {} - for (success, value) in result: + for success, value in result: if not success: click.secho(value, fg="red", err=True) continue diff --git a/platformio/remote/client/device_monitor.py b/platformio/remote/client/device_monitor.py index 46ca19e4..1499dd58 100644 --- a/platformio/remote/client/device_monitor.py +++ b/platformio/remote/client/device_monitor.py @@ -71,7 +71,6 @@ class SMBridgeFactory(protocol.ServerFactory): class DeviceMonitorClient( # pylint: disable=too-many-instance-attributes RemoteClientBase ): - MAX_BUFFER_SIZE = 1024 * 1024 def __init__(self, agents, **kwargs): @@ -96,7 +95,7 @@ class DeviceMonitorClient( # pylint: disable=too-many-instance-attributes def _cb_device_list(self, result): devices = [] hwid_devindexes = [] - for (success, value) in result: + for success, value in result: if not success: click.secho(value, fg="red", err=True) continue diff --git a/platformio/remote/client/run_or_test.py b/platformio/remote/client/run_or_test.py index 71065640..d23d92c7 100644 --- a/platformio/remote/client/run_or_test.py +++ b/platformio/remote/client/run_or_test.py @@ -28,7 +28,6 @@ from platformio.remote.projectsync import PROJECT_SYNC_STAGE, ProjectSync class RunOrTestClient(AsyncClientBase): - MAX_ARCHIVE_SIZE = 50 * 1024 * 1024 # 50Mb UPLOAD_CHUNK_SIZE = 256 * 1024 # 256Kb @@ -147,7 +146,7 @@ class RunOrTestClient(AsyncClientBase): def cb_psync_init_result(self, result): self._acs_total = len(result) - for (success, value) in result: + for success, value in result: if not success: raise pb.Error(value) agent_id, ac_id = value diff --git a/platformio/remote/projectsync.py b/platformio/remote/projectsync.py index 820034ae..1715145f 100644 --- a/platformio/remote/projectsync.py +++ b/platformio/remote/projectsync.py @@ -47,13 +47,13 @@ class ProjectSync: def rebuild_dbindex(self): self._db = {} - for (path, relpath, cb_filter) in self.items: + for path, relpath, cb_filter in self.items: if cb_filter and not cb_filter(path): continue self._insert_to_db(path, relpath) if not isdir(path): continue - for (root, _, files) in os.walk(path, followlinks=True): + for root, _, files in os.walk(path, followlinks=True): for name in files: self._insert_to_db( join(root, name), join(relpath, root[len(path) + 1 :], name) diff --git a/platformio/telemetry.py b/platformio/telemetry.py index 211c0bea..07986419 100644 --- a/platformio/telemetry.py +++ b/platformio/telemetry.py @@ -54,7 +54,6 @@ class TelemetryBase: class MeasurementProtocol(TelemetryBase): - TID = "UA-1768265-9" PARAMS_MAP = { "screen_name": "cd", @@ -201,7 +200,6 @@ class MeasurementProtocol(TelemetryBase): @util.singleton class MPDataPusher: - MAX_WORKERS = 5 def __init__(self): diff --git a/platformio/test/exception.py b/platformio/test/exception.py index 12b76ea4..14cbe5ac 100644 --- a/platformio/test/exception.py +++ b/platformio/test/exception.py @@ -20,7 +20,6 @@ class UnitTestError(PlatformioException): class TestDirNotExistsError(UnitTestError, UserSideException): - MESSAGE = ( "A test folder '{0}' does not exist.\nPlease create 'test' " "directory in the project root and put a test suite.\n" diff --git a/platformio/test/helpers.py b/platformio/test/helpers.py index 01650a0b..25551ef6 100644 --- a/platformio/test/helpers.py +++ b/platformio/test/helpers.py @@ -40,7 +40,6 @@ def list_test_suites(project_config, environments, filters, ignores): test_names = list_test_names(project_config) for env_name in project_config.envs(): for test_name in test_names: - # filter and ignore patterns patterns = dict(filter=list(filters), ignore=list(ignores)) for key, value in patterns.items(): diff --git a/platformio/test/runners/base.py b/platformio/test/runners/base.py index 8f9136f1..78425a76 100644 --- a/platformio/test/runners/base.py +++ b/platformio/test/runners/base.py @@ -54,7 +54,6 @@ class TestRunnerOptions: # pylint: disable=too-many-instance-attributes class TestRunnerBase: - NAME = None EXTRA_LIB_DEPS = None TESTCASE_PARSE_RE = None diff --git a/platformio/test/runners/doctest.py b/platformio/test/runners/doctest.py index 52a0916f..dd30bc92 100644 --- a/platformio/test/runners/doctest.py +++ b/platformio/test/runners/doctest.py @@ -101,7 +101,6 @@ class DoctestTestCaseParser: class DoctestTestRunner(TestRunnerBase): - EXTRA_LIB_DEPS = ["doctest/doctest@^2.4.9"] def __init__(self, *args, **kwargs): diff --git a/platformio/test/runners/googletest.py b/platformio/test/runners/googletest.py index b299002e..8a4d1b15 100644 --- a/platformio/test/runners/googletest.py +++ b/platformio/test/runners/googletest.py @@ -22,7 +22,6 @@ from platformio.test.runners.base import TestRunnerBase class GoogletestTestCaseParser: - # Examples: # [ RUN ] FooTest.Bar # ... @@ -89,7 +88,6 @@ class GoogletestTestCaseParser: class GoogletestTestRunner(TestRunnerBase): - EXTRA_LIB_DEPS = ["google/googletest@^1.12.1"] def __init__(self, *args, **kwargs): diff --git a/platformio/test/runners/readers/serial.py b/platformio/test/runners/readers/serial.py index ab35775b..29916915 100644 --- a/platformio/test/runners/readers/serial.py +++ b/platformio/test/runners/readers/serial.py @@ -22,7 +22,6 @@ from platformio.exception import UserSideException class SerialTestOutputReader: - SERIAL_TIMEOUT = 600 def __init__(self, test_runner): diff --git a/platformio/test/runners/unity.py b/platformio/test/runners/unity.py index b7d8026b..1c8ef795 100644 --- a/platformio/test/runners/unity.py +++ b/platformio/test/runners/unity.py @@ -26,7 +26,6 @@ from platformio.util import strip_ansi_codes class UnityTestRunner(TestRunnerBase): - EXTRA_LIB_DEPS = ["throwtheswitch/Unity@^2.5.2"] # Examples: diff --git a/platformio/util.py b/platformio/util.py index 63a16d6e..c981384a 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -96,7 +96,6 @@ class RetryStopException(RetryException): class retry: - RetryNextException = RetryNextException RetryStopException = RetryStopException diff --git a/tests/commands/test_ci.py b/tests/commands/test_ci.py index ae632280..f67bada4 100644 --- a/tests/commands/test_ci.py +++ b/tests/commands/test_ci.py @@ -112,7 +112,6 @@ def test_ci_keep_build_dir_single_src_dir( def test_ci_keep_build_dir_nested_src_dirs( clirunner, tmpdir_factory, validate_cliresult ): - build_dir = str(tmpdir_factory.mktemp("ci_build_dir")) # Split default Arduino project in two parts