Skip to content

Commit 984add4

Browse files
committed
fixing some typing issues
1 parent bebc3ed commit 984add4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

qoo/queues.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ def __contains__(self, key: str) -> bool:
4141
"""check if the given key exists in this job"""
4242
return key in dir(self)
4343

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

4848
def __str__(self) -> str:
4949
"""return a human-friendly object representation"""
@@ -165,7 +165,7 @@ def send_batch(
165165
raw_jobs: List[Union[Dict, str]],
166166
delay_seconds: int = 0,
167167
auto_metadata: bool = True,
168-
) -> List[Dict]:
168+
) -> Dict:
169169
"""
170170
send a batch of jobs to the queue, chunked into 10s
171171
@@ -174,8 +174,8 @@ def send_batch(
174174
a list of dicts to json.dumps into message bodies
175175
"""
176176
jobs = raw_jobs
177-
successful = []
178-
failed = []
177+
successful = [] # type: List
178+
failed = [] # type: List
179179

180180
# if default, treat each list item as just the message body
181181
if auto_metadata:

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
setup(
1515
name="qoo",
16-
version="0.0.3",
16+
version="0.0.4",
1717
description=("A simple library for interacting with Amazon SQS."),
1818
long_description=LONG_DESCRIPTION,
1919
author="Jacobi Petrucciani",

0 commit comments

Comments
 (0)