Skip to content

Commit

Permalink
Merge pull request #12 from corteva/pylint_update
Browse files Browse the repository at this point in the history
Update syntax for pylint v2.6 requirements
  • Loading branch information
carterthayer authored Sep 30, 2020
2 parents 208a187 + d4a278b commit e41f026
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions rest_framework_mvt/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class MVTManager(models.Manager):
"""

def __init__(self, *args, geo_col="geom", source_name=None, **kwargs):
super(MVTManager, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
self.geo_col = geo_col
self.source_name = source_name

Expand Down Expand Up @@ -105,7 +105,7 @@ def _create_where_clause_with_params(self, table, filters):
try:
sql, params = self.filter(**filters).query.sql_with_params()
except FieldError as error:
raise ValidationError(str(error))
raise ValidationError(str(error)) from error
extra_wheres = " AND " + sql.split("WHERE")[1].strip() if params else ""
where_clause = (
f"ST_Intersects({table}.{self.geo_col}, "
Expand Down
2 changes: 1 addition & 1 deletion rest_framework_mvt/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def _validate_paginate(limit, offset):
except ValueError as value_error:
raise ValidationError(
"Query param validation error: " + str(value_error)
)
) from value_error

return limit, offset

Expand Down

0 comments on commit e41f026

Please sign in to comment.