1 | # pylint: disable=redefined-outer-name,expression-not-assigned,attribute-defined-outside-init,no-member |
||
2 | |||
3 | from expecter import expect |
||
0 ignored issues
–
show
|
|||
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(): |
||
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 |
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.
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.