From 6661f0a34df2518fdfaa626c578bbb6781308c8a Mon Sep 17 00:00:00 2001 From: Mayank Patibandla <34776435+mayankpatibandla@users.noreply.github.com> Date: Mon, 4 Mar 2024 23:59:25 -0500 Subject: [PATCH] Fix W0611 --- .pylintrc | 3 +-- pros/cli/interactive.py | 1 - pros/cli/main.py | 3 +-- pros/cli/terminal.py | 1 - pros/cli/upload.py | 1 - pros/conductor/conductor.py | 2 -- pros/ga/analytics.py | 3 --- pros/serial/devices/vex/v5_device.py | 1 - 8 files changed, 2 insertions(+), 13 deletions(-) diff --git a/.pylintrc b/.pylintrc index 6a02e11c..05261bfb 100644 --- a/.pylintrc +++ b/.pylintrc @@ -24,7 +24,6 @@ # W0108: Lambda may not be necessary # W0511: TODO # E1136: Value is unsubscriptable -# W0611: Unused import # C0103: Variable name doesn't conform to naming style # R1732: Consider using with # W1514: Using open without explicitly specifying an encoding @@ -73,7 +72,7 @@ max-line-length = 120 disable = C0114, C0115, C0116, R0903, C0415, R1705, R0913, W1203, R1729, E1120, E1123, C0209, R1710, W0621, C0121, W0614, W0401, W1202, C0117, W0718, R0205, R0402, R0914, R1725, R1735, C0411, W0237, W0702, W0223, W0613, - W0108, R0912, R0911, W0511, E1136, R0902, W0611, C0412, C0103, C0301, R1732, R0915, W1514, + W0108, R0912, R0911, W0511, E1136, R0902, C0412, C0103, C0301, R1732, R0915, W1514, E1101, R1734, W1201, E0401, W0212, R0904, W0101, C0302, E0110, W0603, R0401, C0303, W4902 diff --git a/pros/cli/interactive.py b/pros/cli/interactive.py index 634f1b2f..1fb3c09f 100644 --- a/pros/cli/interactive.py +++ b/pros/cli/interactive.py @@ -3,7 +3,6 @@ import click import pros.conductor as c from .common import PROSGroup, default_options, project_option, pros_root -from pros.ga.analytics import analytics @pros_root def interactive_cli(): diff --git a/pros/cli/main.py b/pros/cli/main.py index 8e4d6725..f7b8bd3d 100644 --- a/pros/cli/main.py +++ b/pros/cli/main.py @@ -17,7 +17,6 @@ from pros.common.utils import get_version, logger from pros.ga.analytics import analytics -import jsonpickle import pros.cli.build import pros.cli.conductor import pros.cli.conductor_utils @@ -102,7 +101,7 @@ def use_analytics(ctx: click.Context, param, value): analytics.set_use(touse) ui.echo(f'Analytics usage set to: {analytics.useAnalytics}') ctx.exit(0) - + def use_early_access(ctx: click.Context, param, value): if value is None: return diff --git a/pros/cli/terminal.py b/pros/cli/terminal.py index f8e50bb4..55a705fc 100644 --- a/pros/cli/terminal.py +++ b/pros/cli/terminal.py @@ -44,7 +44,6 @@ def terminal(port: str, backend: str, **kwargs): Note: share backend is not yet implemented. """ analytics.send("terminal") - from pros.serial.devices.vex.v5_user_device import V5UserDevice from pros.serial.terminal import Terminal is_v5_user_joystick = False if port == 'default': diff --git a/pros/cli/upload.py b/pros/cli/upload.py index 43597fd5..ece08692 100644 --- a/pros/cli/upload.py +++ b/pros/cli/upload.py @@ -1,5 +1,4 @@ import sys -from unicodedata import name import pros.common.ui as ui import pros.conductor as c diff --git a/pros/conductor/conductor.py b/pros/conductor/conductor.py index 4a1ff067..cf009660 100644 --- a/pros/conductor/conductor.py +++ b/pros/conductor/conductor.py @@ -1,11 +1,9 @@ import errno import os.path import shutil -from enum import Enum from pathlib import Path import sys from typing import * -import re import click from semantic_version import Spec, Version diff --git a/pros/ga/analytics.py b/pros/ga/analytics.py index 247e6b31..209bf5c6 100644 --- a/pros/ga/analytics.py +++ b/pros/ga/analytics.py @@ -1,7 +1,4 @@ -import json -from os import path import uuid -import requests from requests_futures.sessions import FuturesSession import random from concurrent.futures import as_completed diff --git a/pros/serial/devices/vex/v5_device.py b/pros/serial/devices/vex/v5_device.py index c267e959..f0190e1b 100644 --- a/pros/serial/devices/vex/v5_device.py +++ b/pros/serial/devices/vex/v5_device.py @@ -843,7 +843,6 @@ def get_device_status(self): @retries def get_system_status(self) -> SystemStatus: - from semantic_version import Version logger(__name__).debug('Sending ext 0x22 command') version = self.query_system_version() if (version.product == V5Device.SystemVersion.Product.BRAIN and version.system_version in Spec('<1.0.13')) or \