GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 42ca41...4b5a9e )
by Mandeep
53s
created

resource_filename()   A

Complexity

Conditions 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
1
import atexit
2
import contextlib
3
4
import importlib_resources
5
6
7
def resource_filename(package, resource):
8
    """Create a filename resource from a package and its resource."""
9
    file_manager = contextlib.ExitStack()
10
    atexit.register(file_manager.close)
11
12
    return str(file_manager.enter_context(importlib_resources.path(package, resource)))
13