attrs' frozen decorator also acts like a dataclass

In 23.1.0 (specifically in 46053d703d)
the definition of the `frozen` decorator was tweaked slightly, such
that its type stub is separate from that for `define`. This means
that Jedi needs to be told about it as a separate member.

I've manually checked that this still works with the prior version
of `attrs`.

Fixes https://github.com/davidhalter/jedi/issues/1929
This commit is contained in:
Peter Law
2023-05-27 00:11:47 +01:00
parent 3dbcd2c6de
commit 483e78993d

View File

@@ -808,9 +808,11 @@ _implemented = {
# https://www.attrs.org/en/stable/names.html # https://www.attrs.org/en/stable/names.html
'attr': { 'attr': {
'define': _dataclass, 'define': _dataclass,
'frozen': _dataclass,
}, },
'attrs': { 'attrs': {
'define': _dataclass, 'define': _dataclass,
'frozen': _dataclass,
}, },
'os.path': { 'os.path': {
'dirname': _create_string_input_function(os.path.dirname), 'dirname': _create_string_input_function(os.path.dirname),