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
Pull Request — master (#27)
by
unknown
01:14
created

tests.touch()   A

Complexity

Conditions 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 2
nop 1
1
# -*- coding: utf-8 -*-
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
# -----------------------------------------------------------------------------
3
# Copyright (c) 2015 Yann Lanthony
4
# Copyright (c) 2017-2018 Spyder Project Contributors
5
#
6
# Licensed under the terms of the MIT License
7
# (See LICENSE.txt for details)
8
# -----------------------------------------------------------------------------
9
10
# Standard library imports
11
import os
12
import time
13
from os.path import normpath, join, dirname
0 ignored issues
show
introduced by
Imports from package os are not grouped
Loading history...
14
15
16
PROJECT_DIR = normpath(dirname(dirname(__file__)))
17
EXAMPLES_DIR = normpath(join(PROJECT_DIR, 'examples'))
18
19
20
def example(*paths):
21
    """Get path to an example."""
22
23
    return normpath(join(dirname(__file__), '..', 'examples', *paths))
24
25
26
def touch(file):
27
    """Touch a file."""
28
29
    with open(file, 'a') as f:
0 ignored issues
show
Coding Style Naming introduced by
The name f does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Unused Code introduced by
The variable f seems to be unused.
Loading history...
30
        os.utime(file, None)
31
32
33
def await_condition(condition, timeout=2000):
34
    """Return True if a condition is met in the given timeout period"""
35
36
    for _ in range(timeout):
37
        if condition():
38
            return True
39
        time.sleep(0.001)
40
    return False
41
42
0 ignored issues
show
coding-style introduced by
Trailing newlines
Loading history...
43