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 ( 0254c9...47ea54 )
by
unknown
01:26
created

test_all_games()   A

Complexity

Conditions 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
import pytest
2
3
import server
0 ignored issues
show
Unused Code introduced by
The import server seems to be unused.
Loading history...
4
from server.game_service import GameService
0 ignored issues
show
Bug introduced by
The name game_service does not seem to exist in module server.
Loading history...
Configuration introduced by
Unable to import 'server.game_service' (invalid syntax (<string>, line 53))

This can be caused by one of the following:

1. Missing Dependencies

This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.

# .scrutinizer.yml
before_commands:
    - sudo pip install abc # Python2
    - sudo pip3 install abc # Python3
Tip: We are currently not using virtualenv to run pylint, when installing your modules make sure to use the command for the correct version.

2. Missing __init__.py files

This error could also result from missing __init__.py files in your module folders. Make sure that you place one file in each sub-folder.

Loading history...
5
from server.games.game import VisibilityState
0 ignored issues
show
Bug introduced by
The name game does not seem to exist in module server.games.
Loading history...
Configuration introduced by
Unable to import 'server.games.game' (invalid syntax (<string>, line 187))

This can be caused by one of the following:

1. Missing Dependencies

This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.

# .scrutinizer.yml
before_commands:
    - sudo pip install abc # Python2
    - sudo pip3 install abc # Python3
Tip: We are currently not using virtualenv to run pylint, when installing your modules make sure to use the command for the correct version.

2. Missing __init__.py files

This error could also result from missing __init__.py files in your module folders. Make sure that you place one file in each sub-folder.

Loading history...
6
from server.players import PlayerState
7
8
9
@pytest.fixture
10
def service(players, game_stats_service):
11
    return GameService(players, game_stats_service)
12
13
14
def test_initialization(service):
0 ignored issues
show
Comprehensibility Bug introduced by
service is re-defining a name which is already available in the outer-scope (previously defined on line 10).

It is generally a bad practice to shadow variables from the outer-scope. In most cases, this is done unintentionally and might lead to unexpected behavior:

param = 5

class Foo:
    def __init__(self, param):   # "param" would be flagged here
        self.param = param
Loading history...
15
    assert len(service.dirty_games) == 0
16
17
18
def test_create_game(players, service):
0 ignored issues
show
Comprehensibility Bug introduced by
service is re-defining a name which is already available in the outer-scope (previously defined on line 10).

It is generally a bad practice to shadow variables from the outer-scope. In most cases, this is done unintentionally and might lead to unexpected behavior:

param = 5

class Foo:
    def __init__(self, param):   # "param" would be flagged here
        self.param = param
Loading history...
19
    players.hosting.state = PlayerState.IDLE
20
    game = service.create_game(visibility=VisibilityState.PUBLIC,
21
                               game_mode='faf',
22
                               host=players.hosting,
23
                               name='Test',
24
                               mapname='SCMP_007',
25
                               password=None)
26
    assert game is not None
27
    assert game in service.dirty_games
28
29
30
def test_all_games(players, service):
0 ignored issues
show
Comprehensibility Bug introduced by
service is re-defining a name which is already available in the outer-scope (previously defined on line 10).

It is generally a bad practice to shadow variables from the outer-scope. In most cases, this is done unintentionally and might lead to unexpected behavior:

param = 5

class Foo:
    def __init__(self, param):   # "param" would be flagged here
        self.param = param
Loading history...
31
    game = service.create_game(visibility=VisibilityState.PUBLIC,
32
                               game_mode='faf',
33
                               host=players.hosting,
34
                               name='Test',
35
                               mapname='SCMP_007',
36
                               password=None)
37
    assert game in service.pending_games
38