mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
PyLint fixes
This commit is contained in:
@ -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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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}'"
|
||||||
|
|
||||||
|
@ -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):
|
||||||
|
@ -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:
|
||||||
|
@ -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")
|
||||||
|
@ -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(
|
||||||
|
Reference in New Issue
Block a user