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 — develop (#257)
by
unknown
01:03
created

custom_game()   A

Complexity

Conditions 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
import pytest
2
from server.games.game import Game
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 145))

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...
3
from server.games.custom_game import CustomGame
0 ignored issues
show
Bug introduced by
The name custom_game does not seem to exist in module server.games.
Loading history...
Configuration introduced by
Unable to import 'server.games.custom_game' (invalid syntax (<string>, line 12))

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...
4
5
@pytest.yield_fixture
6
def game(loop, game_service, game_stats_service):
7
    game = Game(42, game_service, game_stats_service)
0 ignored issues
show
Comprehensibility Bug introduced by
game is re-defining a name which is already available in the outer-scope (previously defined on line 6).

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...
8
    yield game
9
    loop.run_until_complete(game.clear_data())
10
11
@pytest.yield_fixture
12
def custom_game(loop, game_service, game_stats_service):
13
    game = CustomGame(42, game_service, game_stats_service)
0 ignored issues
show
Comprehensibility Bug introduced by
game is re-defining a name which is already available in the outer-scope (previously defined on line 6).

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...
14
    yield game
15
    loop.run_until_complete(game.clear_data())
16
17