Completed
Push — develop ( 86b58f...0a86d2 )
by Jace
03:19
created

tests/test_list_shortcut.py (8 issues)

1
# pylint: disable=redefined-outer-name,expression-not-assigned,attribute-defined-outside-init,no-member
0 ignored issues
show
Locally disabling redefined-outer-name (W0621)
Loading history...
Locally disabling expression-not-assigned (W0106)
Loading history...
Locally disabling attribute-defined-outside-init (W0201)
Loading history...
Locally disabling no-member (E1101)
Loading history...
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
from expecter import expect
0 ignored issues
show
The import expecter could not be resolved.

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
import yorm
6
from yorm.types import List, Float
7
8
from . import strip
9
10
11
@yorm.attr(things=List.of_type(Float))
12
@yorm.sync("tmp/example.yml")
13
class Example:
14
    """An example class mapping a list using the shortened syntax."""
15
16
17
def test_list_mapping_using_shortened_syntax():
0 ignored issues
show
Coding Style Naming introduced by
The name test_list_mapping_using_shortened_syntax does not conform to the function naming conventions ([a-z_][a-z0-9_]{2,30}$).

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...
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
    obj = Example()
19
    obj.things = [1, 2.0, "3"]
20
21
    expect(obj.__mapper__.text) == strip("""
22
    things:
23
    - 1.0
24
    - 2.0
25
    - 3.0
26
    """)
27