diff --git a/pqdict/__init__.py b/pqdict/__init__.py index 5a547ec..2e3e8f3 100644 --- a/pqdict/__init__.py +++ b/pqdict/__init__.py @@ -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: @@ -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) @@ -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) diff --git a/pyproject.toml b/pyproject.toml index bb8f924..2dba7fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,10 +70,10 @@ 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 @@ -81,6 +81,8 @@ extend-select = [ "W", # style warnings ] ignore = [ + "D100", + "D103", "D203", "D213", ] \ No newline at end of file