GithubHelp home page GithubHelp logo

提案: Type Hintsの追加 about niconico-dl HOT 7 CLOSED

y-chan avatar y-chan commented on July 18, 2024 1
提案: Type Hintsの追加

from niconico-dl.

Comments (7)

tasuren avatar tasuren commented on July 18, 2024 2

了解です。
自分はいつか時間がある時にこのコードを書き直す予定なのでその時にTypeHintsをやろうと思います。
PRを出してくれるともちろん嬉しいです。

from niconico-dl.

tasuren avatar tasuren commented on July 18, 2024 2

TypedDict以外はほとんど実装することができました!

from niconico-dl.

tasuren avatar tasuren commented on July 18, 2024 1

結構できてきました。
型ヒントをつけてみたのですがどうでしょうか?
rewriteブランチにあります。

from niconico-dl.

tasuren avatar tasuren commented on July 18, 2024 1

@y-chan
現在のniconico_dlのコードはあまり良いコードと言えなく書き直したいのと、クッキーを使ったログインが必要なAPIへのリクエストなどもしたいのでニコニコ全体を対象としたniconico.pyというライブラリを作りたいと思います。
そこでは動画のダウンロード以外にもマイリスト取得なども作り型補完がしっかり効くようにしたいと思います。

リポジトリ:https://github.com/tasuren/niconico.py

from niconico-dl.

tasuren avatar tasuren commented on July 18, 2024 1

@y-chan
niconico.pyでダウンロードとマイリストの取得ができるようにし、pypiにリリースをしました。
また、大体の型ヒントをつけています。
(不完全ですが動画タイトル等の最低限のものは実装済みです。)
https://github.com/tasuren/niconico.py

それともうniconico_dlの開発はしないため、このリポジトリは後日アーカイブします。

from niconico-dl.

y-chan avatar y-chan commented on July 18, 2024

良いと思います!
dictに関してはさらに詳細なTypeDictという定義を作ることができます。
これを作るのは非常に面倒だと思いますし、こちらで作りかけていたものがあるので、PRさせてもらいますね。

from niconico-dl.

tasuren avatar tasuren commented on July 18, 2024

ありがとうございます!
了解です。

from niconico-dl.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.