repeaterbook 0.2.0__py3-none-any.whl → 0.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
repeaterbook/queries.py CHANGED
@@ -16,7 +16,7 @@ from typing import TYPE_CHECKING, NamedTuple
16
16
 
17
17
  from haversine import haversine # type: ignore[import-untyped]
18
18
  from loguru import logger
19
- from sqlmodel import or_
19
+ from sqlmodel import and_, or_
20
20
 
21
21
  from repeaterbook.models import Repeater
22
22
  from repeaterbook.utils import Radius, square_bounds
@@ -24,17 +24,16 @@ from repeaterbook.utils import Radius, square_bounds
24
24
  if TYPE_CHECKING: # pragma: no cover
25
25
  from collections.abc import Iterable
26
26
 
27
- from sqlalchemy.sql._typing import _ColumnExpressionArgument
28
27
  from sqlalchemy.sql.elements import ColumnElement
29
28
 
30
29
 
31
- def square(radius: Radius) -> tuple[_ColumnExpressionArgument[bool] | bool, ...]:
30
+ def square(radius: Radius) -> ColumnElement[bool]:
32
31
  """Return a query for repeaters within a given square.
33
32
 
34
33
  Note: This is a square, not a circle. Use `filter_radius` afterwards.
35
34
  """
36
35
  bounds = square_bounds(radius=radius)
37
- return (
36
+ return and_(
38
37
  Repeater.latitude >= bounds.south,
39
38
  Repeater.latitude <= bounds.north,
40
39
  Repeater.longitude >= bounds.west,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: repeaterbook
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Python utility to work with data from RepeaterBook.
5
5
  Project-URL: homepage, https://github.com/MicaelJarniac/repeaterbook
6
6
  Project-URL: source, https://github.com/MicaelJarniac/repeaterbook
@@ -2,10 +2,10 @@ repeaterbook/__init__.py,sha256=EGIRvLGcrzX5ZD8ZoU13XyL825rFS9zPNRS1RSQwilg,251
2
2
  repeaterbook/database.py,sha256=oAqCKGWjD4bQk62rsHTZQO0ESzn7UDrmNg78TZVznjY,1954
3
3
  repeaterbook/models.py,sha256=iKvrMadYdsP1Zi-xqzChHmlT4lL36Crt93xK2q5M814,6422
4
4
  repeaterbook/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- repeaterbook/queries.py,sha256=eUS714SY7wbGZY6DyOEAnE27zkOIw9HuKteO2bBU7YY,3186
5
+ repeaterbook/queries.py,sha256=1VgGNviH5NDCBjc4Q1rt3ORmbrzRsdL2_X_yxGc86DA,3100
6
6
  repeaterbook/services.py,sha256=qct31P_4nV5_rfeGs6bDfIs_ur5heR0CF4HbTNy2GEM,10195
7
7
  repeaterbook/utils.py,sha256=QI5aWci8b3GAIi7l3PfT51sg4TTlwzoHtamNKTGkaaI,1453
8
- repeaterbook-0.2.0.dist-info/METADATA,sha256=rskdgxik9LIFmRFfTFqJ1ahQCYdTO4ZMe5ID_6eWShw,7824
9
- repeaterbook-0.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
10
- repeaterbook-0.2.0.dist-info/licenses/LICENSE,sha256=TtbMt69RbQyifR_It2bTHKdlLR1Dj6x2A5y_oLOyoVk,1071
11
- repeaterbook-0.2.0.dist-info/RECORD,,
8
+ repeaterbook-0.2.1.dist-info/METADATA,sha256=g6Zn8dvKvKVxXFjZrJbTvxFJ-cBe4oRlzz0Tq2YXgM4,7824
9
+ repeaterbook-0.2.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
10
+ repeaterbook-0.2.1.dist-info/licenses/LICENSE,sha256=TtbMt69RbQyifR_It2bTHKdlLR1Dj6x2A5y_oLOyoVk,1071
11
+ repeaterbook-0.2.1.dist-info/RECORD,,