[PR #1153] [MERGED] Add type annotations to cache_handler.py #1187

Closed
opened 2026-02-28 00:03:59 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/spotipy-dev/spotipy/pull/1153
Author: @JackDyre
Created: 8/9/2024
Status: Merged
Merged: 1/18/2025
Merged by: @stephanebruckert

Base: v3Head: type-annotations


📝 Commits (10+)

  • e4d2815 Typed cache_handler.CacheHander + implemented ABC
  • 2cd627c fixed code style
  • 33b5812 Typed cache_handler.CacheFileHandler
  • 2f6096b reverted some refactoring changes
  • e4ba2b5 attempting to reimplement some refactoring changes
  • 6814ab1 rolling back, this makes no sense to me
  • 80a60b0 code style
  • 174c4ec smh it was only linting, tests were fine
  • 68a5399 Switched to typed dict for cache type
  • 6b1d7da calls open()

📊 Changes

2 files changed (+79 additions, -67 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 spotipy/cache_handler.py (+78 -67)

📄 Description

Implementing type annotations in cache_handler.py

I will create separate PRs for each file I type to make the review process easier and to allow it to be merged in slowly.

Currently only the base CacheHandler class has been typed.

Temporary files generated by rye like the pyproject.toml and lockfiles(my preferred python management tool) will be removed when I finish this PR.


🔄 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/1153 **Author:** [@JackDyre](https://github.com/JackDyre) **Created:** 8/9/2024 **Status:** ✅ Merged **Merged:** 1/18/2025 **Merged by:** [@stephanebruckert](https://github.com/stephanebruckert) **Base:** `v3` ← **Head:** `type-annotations` --- ### 📝 Commits (10+) - [`e4d2815`](https://github.com/spotipy-dev/spotipy/commit/e4d2815feb6d5726bb31b8bc3b2136d5196b4649) Typed cache_handler.CacheHander + implemented ABC - [`2cd627c`](https://github.com/spotipy-dev/spotipy/commit/2cd627c265d08e3b74943cfa9757657f3fd24f0f) fixed code style - [`33b5812`](https://github.com/spotipy-dev/spotipy/commit/33b5812ebb76a465de6e1991b3053f6c28239b65) Typed cache_handler.CacheFileHandler - [`2f6096b`](https://github.com/spotipy-dev/spotipy/commit/2f6096be5ffca1160ca4ca7ded6cfc195cdf585a) reverted some refactoring changes - [`e4ba2b5`](https://github.com/spotipy-dev/spotipy/commit/e4ba2b5ff3fe7bdb19fd14cfbc98944ece34b93e) attempting to reimplement some refactoring changes - [`6814ab1`](https://github.com/spotipy-dev/spotipy/commit/6814ab10e4fbc7b20fd12e6e99778d3f937c2cc3) rolling back, this makes no sense to me - [`80a60b0`](https://github.com/spotipy-dev/spotipy/commit/80a60b0e589a0c63242370e58661f6c9fd8b4f92) code style - [`174c4ec`](https://github.com/spotipy-dev/spotipy/commit/174c4ecfbe900c5777ccc2a227f1b7a404f15a74) smh it was only linting, tests were fine - [`68a5399`](https://github.com/spotipy-dev/spotipy/commit/68a539920355ef739f9fd40d6b1962163c206776) Switched to typed dict for cache type - [`6b1d7da`](https://github.com/spotipy-dev/spotipy/commit/6b1d7da03360cc818b87f9289c81db87800862df) calls `open()` ### 📊 Changes **2 files changed** (+79 additions, -67 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `spotipy/cache_handler.py` (+78 -67) </details> ### 📄 Description Implementing type annotations in cache_handler.py I will create separate PRs for each file I type to make the review process easier and to allow it to be merged in slowly. Currently only the base CacheHandler class has been typed. Temporary files generated by rye like the pyproject.toml and lockfiles(my preferred python management tool) will be removed when I finish this PR. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 00:03:59 +03:00
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#1187
No description provided.