Skip to content

Tracking: Upgrade docstring linting #2424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
2 tasks
dangotbanned opened this issue Apr 23, 2025 · 0 comments
Open
2 tasks

Tracking: Upgrade docstring linting #2424

dangotbanned opened this issue Apr 23, 2025 · 0 comments
Labels
documentation Improvements or additions to documentation internal upstream issue

Comments

@dangotbanned
Copy link
Member

dangotbanned commented Apr 23, 2025

Issues

Related

Description

We're currently using darglint, which is a flake8 plugin that was archived 2½ years ago.
Our .pre-commit-config.yaml lists a pretty old ruff issue, but there seems to have been progress made in a more recent issue.

- repo: https://github.com/pycqa/flake8
rev: '7.2.0' # todo: remove once https://github.com/astral-sh/ruff/issues/458 is addressed
hooks:
- id: flake8
additional_dependencies: [darglint==1.8.1, Flake8-pyproject]

I'm not sure if the functionality in (DOC) is enough for us yet, but switching to the actively maintained pydoclint seems like another option worth exploring.

Extra

I'd really like if we can find something that allows for cutting down on the repetition mentioned in (#1943 (comment))

E.g. here I just wanted to add a one-liner for context, but instead need to repeat so much redundant information for darglint 😞

narwhals/narwhals/utils.py

Lines 1658 to 1667 in f47ad1f

def _into_arrow_table(data: IntoArrowTable, context: _FullContext, /) -> pa.Table:
"""Guards `ArrowDataFrame.from_arrow` w/ safer imports.
Arguments:
data: Object which implements `__arrow_c_stream__`.
context: Initialized compliant object.
Returns:
A PyArrow Table.
"""

@dangotbanned dangotbanned added documentation Improvements or additions to documentation internal upstream issue labels Apr 23, 2025
@dangotbanned dangotbanned changed the title Tracking: Upgrading docstring linting Tracking: Upgrade docstring linting Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation internal upstream issue
Projects
None yet
Development

No branches or pull requests

1 participant