PyLint fixes

This commit is contained in:
Ivan Kravets
2020-04-28 12:48:15 +03:00
parent d1b394b20a
commit 5d8440fdd1
7 changed files with 6 additions and 8 deletions

View File

@ -14,6 +14,7 @@
# pylint: disable=no-member, no-self-use, unused-argument, too-many-lines # pylint: disable=no-member, no-self-use, unused-argument, too-many-lines
# pylint: disable=too-many-instance-attributes, too-many-public-methods # pylint: disable=too-many-instance-attributes, too-many-public-methods
# pylint: disable=assignment-from-no-return
from __future__ import absolute_import from __future__ import absolute_import

View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# pylint: disable=keyword-arg-before-vararg, arguments-differ # pylint: disable=keyword-arg-before-vararg,arguments-differ,signature-differs
import os import os
import socket import socket

View File

@ -92,7 +92,7 @@ class PlatformIOPackageException(PlatformioException):
pass pass
class UnknownPackage(PlatformIOPackageException): class UnknownPackage(UserSideException):
MESSAGE = "Detected unknown package '{0}'" MESSAGE = "Detected unknown package '{0}'"

View File

@ -33,7 +33,7 @@ CORE_PACKAGES = {
"tool-pvs-studio": "~7.7.0", "tool-pvs-studio": "~7.7.0",
} }
# pylint: disable=arguments-differ # pylint: disable=arguments-differ,signature-differs
class CorePackageManager(PackageManager): class CorePackageManager(PackageManager):

View File

@ -84,6 +84,7 @@ class LibraryManager(BasePkgManager):
for v in versions: for v in versions:
semver_new = self.parse_semver_version(v["name"]) semver_new = self.parse_semver_version(v["name"])
if semver_spec: if semver_spec:
# pylint: disable=unsupported-membership-test
if not semver_new or semver_new not in semver_spec: if not semver_new or semver_new not in semver_spec:
continue continue
if not item or self.parse_semver_version(item["name"]) < semver_new: if not item or self.parse_semver_version(item["name"]) < semver_new:

View File

@ -46,7 +46,7 @@ class PackageRepoIterator(object):
return self return self
def __next__(self): def __next__(self):
return self.next() return self.next() # pylint: disable=not-callable
@staticmethod @staticmethod
@util.memoized(expire="60s") @util.memoized(expire="60s")

View File

@ -294,10 +294,6 @@ def on_exception(e):
isinstance(e, cls) isinstance(e, cls)
for cls in (IOError, exception.ReturnErrorCode, exception.UserSideException,) for cls in (IOError, exception.ReturnErrorCode, exception.UserSideException,)
] ]
try:
skip_conditions.append("[API] Account: " in str(e))
except UnicodeEncodeError as ue:
e = ue
if any(skip_conditions): if any(skip_conditions):
return return
is_fatal = any( is_fatal = any(