Type annotation for attr.ib wrappers functions
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
Reproduce the example with mypy 0.812, Python 3.7.3, and attrs 20.3.0, focusing on the unexpected keyword argument for the wrapped attribute. Then inspect the attrs typing integration and determine what support is needed; done means the example type-checks without the acme error.
索引モデルが issue の本文から書いたものです。
説明
It's possible to type a method that wraps an attr.ib attribute?
Example:
import attr
from typing import Any
def typed() -> Any:
return attr.ib(type=str)
@attr.s
class TestingParams:
foo = attr.ib(type=str)
acme = typed()
TestingParams(foo='1', acme='3')
Executing mypy (0.812) with Python (3.7.3) and attrs (20.3.0) I got the following output
error: Unexpected keyword argument "acme" for "TestingParams" [call-arg]
- 主要言語
- Python
- スター
- 5.8k
- フォーク
- 480
- 平均マージ
- 2時間 15分
- マージ済み PR(30日)
- 2
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python-attrs/attrs のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
python-attrs/attrs#1620 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
python-attrs/attrs#1596 · コメント 2 件 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
python-attrs/attrs#1549 · コメント 3 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
python-attrs/attrs#1543 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
python-attrs/attrs#1532 ·
python-attrs/attrs の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
stephrobert/dsoxlab#238 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
sublimehq/package_control#1780 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
nwg-piotr/nwg-displays#145 ·