Skip to content

Commit

Permalink
style: Fix and re-enable pydocstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
nvictus committed Feb 13, 2024
1 parent 55ef5ec commit 1df334c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions pqdict/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ def __init__(
precedence function via the ``precedes`` keyword argument.
Alternatively, use the explicit :meth:`pqdict.minpq` or
:meth:`pqdict.maxpq` class methods.
"""
if reverse:
if precedes == lt:
Expand Down Expand Up @@ -635,6 +636,7 @@ def nlargest(n: int, mapping: Mapping, key: Optional[PrioKeyFn] = None):
This function is equivalent to:
>>> [item[0] for item in heapq.nlargest(n, mapping.items(), lambda x: x[1])]
"""
it = iter(mapping.items())
pq = pqdict(key=key, precedes=lt)
Expand Down Expand Up @@ -680,6 +682,7 @@ def nsmallest(n: int, mapping: Mapping, key: Optional[PrioKeyFn] = None):
This function is equivalent to:
>>> [item[0] for item in heapq.nsmallest(n, mapping.items(), lambda x: x[1])]
"""
it = iter(mapping.items())
pq = pqdict(key=key, precedes=gt)
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,19 @@ universal = true
profile = "black"
skip_gitignore = true

[tool.ruff]
[tool.ruff.lint]
extend-select = [
"E", # style errors
# "D", # pydocstyle
"D", # pydocstyle
"F", # pyflakes
"I", # isort
"RUF", # ruff-specific rules
"UP", # pyupgrade
"W", # style warnings
]
ignore = [
"D100",
"D103",
"D203",
"D213",
]

0 comments on commit 1df334c

Please sign in to comment.