forked from platformio/platformio-core
PyLint fixes
This commit is contained in:
@ -6,7 +6,4 @@ disable=
|
||||
missing-docstring,
|
||||
invalid-name,
|
||||
too-few-public-methods,
|
||||
useless-import-alias,
|
||||
bad-option-value,
|
||||
consider-using-dict-items,
|
||||
consider-using-f-string
|
||||
|
@ -37,8 +37,8 @@ def team_list_cmd(orgname, json_output):
|
||||
return click.echo(json.dumps(data[orgname] if orgname else data))
|
||||
if not any(data.values()):
|
||||
return click.secho("You do not have any teams.", fg="yellow")
|
||||
for org_name in data:
|
||||
for team in data[org_name]:
|
||||
for org_name, teams in data.items():
|
||||
for team in teams:
|
||||
click.echo()
|
||||
click.secho("%s:%s" % (org_name, team.get("name")), fg="cyan")
|
||||
click.echo("-" * len("%s:%s" % (org_name, team.get("name"))))
|
||||
|
@ -12,9 +12,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# pylint: disable=no-self-use, unused-argument, too-many-lines
|
||||
# pylint: disable=too-many-instance-attributes, too-many-public-methods
|
||||
# pylint: disable=assignment-from-no-return
|
||||
# pylint: disable=assignment-from-no-return, unused-argument, too-many-lines
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
|
@ -67,8 +67,8 @@ class ClangtidyCheckTool(CheckToolBase):
|
||||
project_files = self.get_project_target_files(self.options["patterns"])
|
||||
|
||||
src_files = []
|
||||
for scope in project_files:
|
||||
src_files.extend(project_files[scope])
|
||||
for items in project_files.values():
|
||||
src_files.extend(items)
|
||||
|
||||
cmd.extend(flags + src_files + ["--"])
|
||||
cmd.extend(
|
||||
|
@ -28,7 +28,7 @@ from platformio.util import memoized
|
||||
|
||||
|
||||
class BaseSchema(Schema):
|
||||
class Meta: # pylint: disable=no-init
|
||||
class Meta:
|
||||
unknown = marshmallow.EXCLUDE # pylint: disable=no-member
|
||||
|
||||
def load_manifest(self, data):
|
||||
@ -232,7 +232,7 @@ class ManifestSchema(BaseSchema):
|
||||
)
|
||||
|
||||
@validates("version")
|
||||
def validate_version(self, value): # pylint: disable=no-self-use
|
||||
def validate_version(self, value):
|
||||
try:
|
||||
value = str(value)
|
||||
assert "." in value
|
||||
|
@ -22,7 +22,7 @@ from twisted.spread import pb # pylint: disable=import-error
|
||||
from platformio.remote.client.base import RemoteClientBase
|
||||
|
||||
|
||||
class SMBridgeProtocol(protocol.Protocol): # pylint: disable=no-init
|
||||
class SMBridgeProtocol(protocol.Protocol):
|
||||
def connectionMade(self):
|
||||
self.factory.add_client(self)
|
||||
|
||||
|
@ -42,10 +42,10 @@ def list_test_suites(project_config, environments, filters, ignores):
|
||||
|
||||
# filter and ignore patterns
|
||||
patterns = dict(filter=list(filters), ignore=list(ignores))
|
||||
for key in patterns:
|
||||
if patterns[key]: # overriden from CLI
|
||||
for key, value in patterns.items():
|
||||
if value: # overriden from CLI
|
||||
continue
|
||||
patterns[key].extend(
|
||||
patterns[key].extend( # pylint: disable=unnecessary-dict-index-lookup
|
||||
project_config.get(f"env:{env_name}", f"test_{key}", [])
|
||||
)
|
||||
|
||||
|
@ -194,7 +194,7 @@ class TestRunnerBase:
|
||||
target=targets,
|
||||
)
|
||||
|
||||
def configure_build_env(self, env): # pylint: disable=no-self-use
|
||||
def configure_build_env(self, env):
|
||||
"""
|
||||
Configure SCons build environment
|
||||
Called in "builder/tools/piotest" tool
|
||||
@ -212,5 +212,5 @@ class TestRunnerBase:
|
||||
self._testing_output_buffer = self._testing_output_buffer[nl_pos + 1 :]
|
||||
self.on_testing_line_output(line)
|
||||
|
||||
def on_testing_line_output(self, line): # pylint: disable=no-self-use
|
||||
def on_testing_line_output(self, line):
|
||||
click.echo(line, nl=False)
|
||||
|
Reference in New Issue
Block a user