[PR #701] Add basic type annotations #1002

Open
opened 2026-02-28 00:03:11 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/spotipy-dev/spotipy/pull/701
Author: @akathorn
Created: 7/1/2021
Status: 🔄 Open

Base: v3_oldprsonlyHead: basic-typing


📝 Commits (10+)

  • 49e42f9 Add representation for JSON return values
  • 0047299 Add typing_extensions as dependency
  • a6804af Annotate util.py and exceptions.py
  • 24416a3 Partly annotate client.py
  • 6fdfc57 Annotate cache_handler.py
  • 6eabb04 Small anotation in scope.py
  • c60a562 Annotate all arguments in client.py
  • cc90dda Annotate most of oauth2.py public api
  • 61ce06c A big pass over client.py
  • 95e4859 Annotate all return types in client.py

📊 Changes

8 files changed (+264 additions, -208 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 setup.py (+1 -0)
📝 spotipy/cache_handler.py (+28 -11)
📝 spotipy/client.py (+162 -133)
📝 spotipy/exceptions.py (+5 -1)
📝 spotipy/oauth2.py (+62 -59)
📝 spotipy/scope.py (+2 -2)
📝 spotipy/util.py (+3 -2)

📄 Description

All parameters for public methods are annotated.
Methods that return a JSON are annotated with a return type of Dict[str, Any], which is quite limited.

This is part of #439.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/spotipy-dev/spotipy/pull/701 **Author:** [@akathorn](https://github.com/akathorn) **Created:** 7/1/2021 **Status:** 🔄 Open **Base:** `v3_oldprsonly` ← **Head:** `basic-typing` --- ### 📝 Commits (10+) - [`49e42f9`](https://github.com/spotipy-dev/spotipy/commit/49e42f906b3ca41d3db5d2adf0a9e06a5af8447d) Add representation for JSON return values - [`0047299`](https://github.com/spotipy-dev/spotipy/commit/0047299e555e6d585b40ace9cf9a42eaad1a4be2) Add typing_extensions as dependency - [`a6804af`](https://github.com/spotipy-dev/spotipy/commit/a6804af835bd3fbf2c859f62fa7ae323358511a4) Annotate util.py and exceptions.py - [`24416a3`](https://github.com/spotipy-dev/spotipy/commit/24416a302ebe8c45e36cbc2004e4a77878815e8f) Partly annotate client.py - [`6fdfc57`](https://github.com/spotipy-dev/spotipy/commit/6fdfc5734a67e749e4cee94d1f64add39e02863c) Annotate cache_handler.py - [`6eabb04`](https://github.com/spotipy-dev/spotipy/commit/6eabb043a72565a613c04bcb09a0b196c000ff6d) Small anotation in scope.py - [`c60a562`](https://github.com/spotipy-dev/spotipy/commit/c60a562737ab42b17b73dcb2ec43de1eab5297db) Annotate all arguments in client.py - [`cc90dda`](https://github.com/spotipy-dev/spotipy/commit/cc90dda990d796d1ba9bfc1f603d23d6d1698d42) Annotate most of oauth2.py public api - [`61ce06c`](https://github.com/spotipy-dev/spotipy/commit/61ce06c75e08b7f2d4ca5f3ceb45bb4bfad6d527) A big pass over client.py - [`95e4859`](https://github.com/spotipy-dev/spotipy/commit/95e4859416bb67ae46dac6ca60da3086141280df) Annotate all return types in client.py ### 📊 Changes **8 files changed** (+264 additions, -208 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `setup.py` (+1 -0) 📝 `spotipy/cache_handler.py` (+28 -11) 📝 `spotipy/client.py` (+162 -133) 📝 `spotipy/exceptions.py` (+5 -1) 📝 `spotipy/oauth2.py` (+62 -59) 📝 `spotipy/scope.py` (+2 -2) 📝 `spotipy/util.py` (+3 -2) </details> ### 📄 Description All parameters for public methods are annotated. Methods that return a JSON are annotated with a return type of `Dict[str, Any]`, which is quite limited. This is part of #439. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#1002
No description provided.