Small fixes / optimizations

This commit is contained in:
Mads Marquart
2020-01-22 23:56:39 +01:00
parent 1526266bf3
commit 8277b22c5c
3 changed files with 12 additions and 2 deletions

View File

@@ -146,7 +146,7 @@ class Listener:
def _fetch_sequence_id(session: _session.Session) -> int:
"""Fetch sequence ID."""
params = {
"limit": 1,
"limit": 0,
"tags": ["INBOX"],
"before": None,
"includeDeliveryReceipts": False,

View File

@@ -195,7 +195,7 @@ class UserData(User):
)
@attr.s
@attrs_default
class ActiveStatus:
#: Whether the user is active now
active = attr.ib(None, type=bool)

10
tests/test_examples.py Normal file
View File

@@ -0,0 +1,10 @@
import pytest
import py_compile
import glob
from os import path
def test_examples_compiles():
# Compiles the examples, to check for syntax errors
for name in glob.glob(path.join(path.dirname(__file__), "../examples", "*.py")):
py_compile.compile(name)