mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-07 20:54:29 +08:00
Fix Paginator properties mistyped as Callables (#193)
Co-authored-by: Nick Sweeting <git@sweeting.me>
This commit is contained in:
@@ -32,7 +32,9 @@ class Paginator:
|
|||||||
def validate_number(self, number: Optional[Union[float, str]]) -> int: ...
|
def validate_number(self, number: Optional[Union[float, str]]) -> int: ...
|
||||||
def get_page(self, number: Optional[int]) -> Page: ...
|
def get_page(self, number: Optional[int]) -> Page: ...
|
||||||
def page(self, number: Union[int, str]) -> Page: ...
|
def page(self, number: Union[int, str]) -> Page: ...
|
||||||
|
@property
|
||||||
def count(self) -> int: ...
|
def count(self) -> int: ...
|
||||||
|
@property
|
||||||
def num_pages(self) -> int: ...
|
def num_pages(self) -> int: ...
|
||||||
@property
|
@property
|
||||||
def page_range(self) -> range: ...
|
def page_range(self) -> range: ...
|
||||||
|
|||||||
@@ -230,6 +230,9 @@ IGNORED_ERRORS = {
|
|||||||
'Item "OneToOneField[Union[Place, Combinable], Place]" '
|
'Item "OneToOneField[Union[Place, Combinable], Place]" '
|
||||||
+ 'of "Union[OneToOneField[Union[Place, Combinable], Place], Any]"',
|
+ 'of "Union[OneToOneField[Union[Place, Combinable], Place], Any]"',
|
||||||
],
|
],
|
||||||
|
'pagination': [
|
||||||
|
'"int" not callable',
|
||||||
|
],
|
||||||
'postgres_tests': [
|
'postgres_tests': [
|
||||||
'DummyArrayField',
|
'DummyArrayField',
|
||||||
'DummyJSONField',
|
'DummyJSONField',
|
||||||
|
|||||||
Reference in New Issue
Block a user