Skip to content

Commit

Permalink
fixing some typing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jpetrucciani committed Aug 29, 2019
1 parent bebc3ed commit 984add4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions qoo/queues.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ def __contains__(self, key: str) -> bool:
"""check if the given key exists in this job"""
return key in dir(self)

def __eq__(self, other: "Job") -> bool:
def __eq__(self, other: object) -> bool:
"""check if this Job is equal to another"""
return self._handle == other._handle
return isinstance(other, Job) and self._handle == other._handle

def __str__(self) -> str:
"""return a human-friendly object representation"""
Expand Down Expand Up @@ -165,7 +165,7 @@ def send_batch(
raw_jobs: List[Union[Dict, str]],
delay_seconds: int = 0,
auto_metadata: bool = True,
) -> List[Dict]:
) -> Dict:
"""
send a batch of jobs to the queue, chunked into 10s
Expand All @@ -174,8 +174,8 @@ def send_batch(
a list of dicts to json.dumps into message bodies
"""
jobs = raw_jobs
successful = []
failed = []
successful = [] # type: List
failed = [] # type: List

# if default, treat each list item as just the message body
if auto_metadata:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

setup(
name="qoo",
version="0.0.3",
version="0.0.4",
description=("A simple library for interacting with Amazon SQS."),
long_description=LONG_DESCRIPTION,
author="Jacobi Petrucciani",
Expand Down

0 comments on commit 984add4

Please sign in to comment.