Skip to content

Commit

Permalink
type annotate validators
Browse files Browse the repository at this point in the history
  • Loading branch information
siddhantgoel committed Aug 3, 2019
1 parent 973391a commit ac3d485
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions streaming_form_data/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ class ValidationError(Exception):


class MaxSizeValidator:
def __init__(self, max_size):
def __init__(self, max_size: int):
self.so_far = 0
self.max_size = max_size

def __call__(self, chunk):
def __call__(self, chunk: bytes):
self.so_far += len(chunk)

if self.so_far > self.max_size:
Expand Down

0 comments on commit ac3d485

Please sign in to comment.