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 ( fbcf0f...5274ad )
by thatsIch
57s
created

get_cached_addon_path()   A

Complexity

Conditions 2

Size

Total Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
c 1
b 0
f 0
dl 0
loc 15
rs 9.4285
1
import os.path
0 ignored issues
show
Coding Style introduced by
This module should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
2
from functools import lru_cache
3
4
from .. import logger
1 ignored issue
show
Bug introduced by
The name logger does not seem to exist in module path.
Loading history...
5
6
from .setting_path_provider import get_cached_setting_path
7
8
9
@lru_cache(maxsize=None)
10
def get_cached_addon_path():
11
    """
12
    Get the value of the #ADDONSPATH# variable
13
    """
14
15
    settingspath = get_cached_setting_path()
16
    if not settingspath:
17
        logger.error(
18
            __file__,
19
            "get_cached_addon_path()",
20
            "#SETTINGSPATH# resolution required but was not found"
21
        )
22
        return
23
    return os.path.join(settingspath, "Addons") + "\\"
24