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.

RainmeterOpenSkinsFolderCommand   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
dl 0
loc 17
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 10 3
1
"""This module provides a command to open the Rainmeter Skin folder."""
2
3
4
import os.path
5
6
import sublime
7
import sublime_plugin
8
9
from .path.skin_path_provider import get_cached_skin_path
10
11
12
class RainmeterOpenSkinsFolderCommand(sublime_plugin.WindowCommand): #pylint: disable=R0903; sublime text API, methods are overriden
13
    """
14
    WindowCommands are instantiated once per window.
15
16
    The Window object may be retrieved via self.window.
17
    """
18
19
    def run(self):
20
        """Called when the command is run."""
21
        skinspath = get_cached_skin_path()
22
        if not skinspath or not os.path.exists(skinspath):
23
            sublime.error_message(
24
                "Error while trying to open Rainmeter" +
25
                " skins folder: Directory not found. Please check the" +
26
                " value of your \"skins_path\" setting.")
27
            return
28
        self.window.run_command("open_dir", {"dir": skinspath})
29