Skip to content

Commit

Permalink
Return an empty list by default in `pkg_resources.ResourceManager.c…
Browse files Browse the repository at this point in the history
…leanup_resources` (#4244)
  • Loading branch information
abravalheri committed Mar 5, 2024
2 parents 226e1a2 + 5b538e1 commit ef6c7ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions newsfragments/4244.bugfix.rst
@@ -0,0 +1 @@
Return an empty `list` by default in ``pkg_resources.ResourceManager.cleanup_resources`` -- by :user:`Avasam`
5 changes: 3 additions & 2 deletions pkg_resources/__init__.py
Expand Up @@ -27,7 +27,7 @@
import time
import re
import types
from typing import Protocol
from typing import List, Protocol
import zipfile
import zipimport
import warnings
Expand Down Expand Up @@ -1339,7 +1339,7 @@ def set_extraction_path(self, path):

self.extraction_path = path

def cleanup_resources(self, force=False):
def cleanup_resources(self, force=False) -> List[str]:
"""
Delete all extracted resource files and directories, returning a list
of the file and directory names that could not be successfully removed.
Expand All @@ -1351,6 +1351,7 @@ def cleanup_resources(self, force=False):
directory used for extractions.
"""
# XXX
return []


def get_default_cache():
Expand Down

0 comments on commit ef6c7ab

Please sign in to comment.