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.run()   A
last analyzed

Complexity

Conditions 3

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
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