Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/whatsnew/fragments/10703.false_positive
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Fix a false positive for ``unexpected-keyword-arg`` for dataclasses
using generic type aliases (PEP 695).

Closes #10703
4 changes: 4 additions & 0 deletions doc/whatsnew/fragments/10788.false_positive
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Fix a false positive for ``too-many-function-args`` for dataclasses
using generic type aliases (PEP 695).

Closes #10788
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ dynamic = [ "version" ]
# All the dependencies of the project will be configured here, once pip fully supports PEP735
# TODO: Remove all requirements.txt files and use this section instead once pip supports PEP735
dependencies = [
# Also upgrade requirements_test_min.txt.
# Also upgrade test-min dependency group and requirements_test_min.txt.
# Pinned to dev of second minor update to allow editable installs and fix primer issues,
# see https://github.com/pylint-dev/astroid/issues/1341
"astroid>=4.0.2,<=4.1.dev0",
"astroid>=4.0.3,<=4.1.dev0",
"colorama>=0.4.5; sys_platform=='win32'",
"dill>=0.2; python_version<'3.11'",
"dill>=0.3.6; python_version>='3.11'",
Expand Down Expand Up @@ -94,7 +94,7 @@ docs = [
# Configuration for the build system
test-min = [
# Base test dependencies
"astroid==4.0.2", # Pinned to a specific version for tests
"astroid==4.0.3", # Pinned to a specific version for tests
"py~=1.11.0",
"pytest>=8.4,<10",
"pytest-benchmark~=5.1",
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_min.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.[testutils,spelling]
# astroid dependency is also defined in pyproject.toml
astroid==4.0.2 # Pinned to a specific version for tests
astroid==4.0.3 # Pinned to a specific version for tests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we choose between the pyproject.toml or this ? (I'm for using the pyproject)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep I figure the plan is to remove these files?

typing-extensions~=4.15
py~=1.11.0
pytest>=8.4,<10.0
Expand Down
29 changes: 29 additions & 0 deletions tests/functional/d/dataclass/dataclass_py312.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# pylint: disable=missing-class-docstring
"""Dataclasses using PEP 695 syntax."""
import dataclasses


@dataclasses.dataclass
class B[X]:
x: X


@dataclasses.dataclass
class C(B[int]):
pass


C(x=0)


@dataclasses.dataclass
class One[T]:
one: T


@dataclasses.dataclass
class Two[T](One[T]):
two: T

one = One(1)
two = Two(1, 2)
2 changes: 2 additions & 0 deletions tests/functional/d/dataclass/dataclass_py312.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[testoptions]
min_pyver = 3.12