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
Branch master (fd87bb)
by thatsIch
01:20
created

__is_online()   A

Complexity

Conditions 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 7
rs 9.4285
1
import http.client
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...
Bug introduced by
The name client does not seem to exist in module http.
Loading history...
2
3
4
def __is_online(domain, sub_path, response_status, response_reason):
0 ignored issues
show
Coding Style introduced by
This function 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...
5
    conn = http.client.HTTPSConnection(domain, timeout=1)
0 ignored issues
show
Bug introduced by
The Module http does not seem to have a member named client.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
6
    conn.request("HEAD", sub_path)
7
    response = conn.getresponse()
8
    conn.close()
9
10
    return (response.status == response_status) and (response.reason == response_reason)
11
12
13
def is_rm_doc_online():
0 ignored issues
show
Coding Style introduced by
This function 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...
14
    return __is_online("docs.rainmeter.net", "/manual-beta/", 200, "OK")
15
16
17
def is_gh_online():
0 ignored issues
show
Coding Style introduced by
This function 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...
18
    return __is_online("github.com", "/", 200, "OK")
19
20
21
def is_gh_raw_online():
22
    """
23
    Check if the raw content delivery from Github is online.
24
25
    It is routed to 301 and Moved Permanently because per standard it is routed to github.com
26
    because it natively only accepts real content paths.
27
28
    We do not follow reroutes else it would be 200 OK on github.com but we already have another method to check for that
29
    and Github.com is on a different service than the content delivery.
30
    """
31
    return __is_online("raw.githubusercontent.com", "/", 301, "Moved Permanently")
32