tarantool / tarantool/tarantool-python

Type hints and type check

オープン
#266 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

2sp code health needs feedback
主要言語
Python
スター
108
フォーク
51
平均マージ
1日 8時間
マージ済み PR(30日)
1

説明

Type hints is a modern Python way to provide type information (see typing mypy). PR https://github.com/tarantool/tarantool-python/pull/264 is the first one to potentially use type hints, but it would be nice to have it anywhere.

Type asserts is a more tricky question. For now there are some minor type checks and asserts in connector. Some may also be implemented in PR #264. But it is a big question if they should be use. It seems that there are both adepts of using (since it is a convenient concept) and forbidding to use (since it contradicts Python duck typing principle) it. For example, see this StackOverflow thread. One way or another, it would be good to at least have a consistency on this question.

Since now package is fully documented, it should be easy to implement type hints and asserts after one decide what approach we should stick to. But choosing the approach is the question.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず PR #264 と、既存の connector の型チェックおよび asserts を読み、次にパッケージのドキュメントと、リンクされている typing および mypy のリファレンスを確認してください。この Issue では、最初に型ヒントを追加するかどうか、また実行時の型チェックまたは asserts をどの程度一貫して使用するかを決める必要があります。合意した方針がパッケージ全体に適用されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
api, backend
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。