forked from platformio/platformio-core
PyLint fixes
This commit is contained in:
@@ -12,6 +12,8 @@
|
|||||||
# 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=too-many-ancestors
|
||||||
|
|
||||||
import marshmallow
|
import marshmallow
|
||||||
import requests
|
import requests
|
||||||
import semantic_version
|
import semantic_version
|
||||||
@@ -32,12 +34,10 @@ if MARSHMALLOW_2:
|
|||||||
else:
|
else:
|
||||||
|
|
||||||
class CompatSchema(Schema):
|
class CompatSchema(Schema):
|
||||||
class Meta:
|
class Meta(object): # pylint: disable=no-init
|
||||||
unknown = marshmallow.EXCLUDE
|
unknown = marshmallow.EXCLUDE # pylint: disable=no-member
|
||||||
|
|
||||||
def handle_error( # pylint: disable=arguments-differ
|
def handle_error(self, error, data, **_): # pylint: disable=arguments-differ
|
||||||
self, error, data, **kwargs
|
|
||||||
):
|
|
||||||
raise ManifestValidationError(
|
raise ManifestValidationError(
|
||||||
error.messages,
|
error.messages,
|
||||||
data,
|
data,
|
||||||
@@ -56,7 +56,7 @@ class BaseSchema(CompatSchema):
|
|||||||
|
|
||||||
|
|
||||||
class StrictSchema(BaseSchema):
|
class StrictSchema(BaseSchema):
|
||||||
def handle_error(self, error, data, **kwargs): # pylint: disable=arguments-differ
|
def handle_error(self, error, data, **_): # pylint: disable=arguments-differ
|
||||||
# skip broken records
|
# skip broken records
|
||||||
if self.many:
|
if self.many:
|
||||||
error.valid_data = [
|
error.valid_data = [
|
||||||
@@ -70,7 +70,9 @@ class StrictSchema(BaseSchema):
|
|||||||
|
|
||||||
|
|
||||||
class StrictListField(fields.List):
|
class StrictListField(fields.List):
|
||||||
def _deserialize(self, value, attr, data, **kwargs):
|
def _deserialize( # pylint: disable=arguments-differ
|
||||||
|
self, value, attr, data, **kwargs
|
||||||
|
):
|
||||||
try:
|
try:
|
||||||
return super(StrictListField, self)._deserialize(
|
return super(StrictListField, self)._deserialize(
|
||||||
value, attr, data, **kwargs
|
value, attr, data, **kwargs
|
||||||
|
Reference in New Issue
Block a user