summaryrefslogtreecommitdiff
path: root/tests/functional/r/redefined/redefined_builtin.py
blob: 9cb454dd09c1496c53aea331c8a2e9a3d11c87ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
"""Tests for redefining builtins."""
# pylint: disable=unused-import, wrong-import-position, reimported, import-error
# pylint: disable=redefined-outer-name, import-outside-toplevel, wrong-import-order


def function():
    """Redefined local."""
    type = 1  # [redefined-builtin]
    print(type)


# pylint:disable=invalid-name
map = {}  # [redefined-builtin]
__doc__ = "reset the doc"


# Test redefining-builtins
from notos import open  # [redefined-builtin]

# Test default redefining-builtins-modules setting
from os import open

# Test non-default redefining-builtins-modules setting in function
def test():
    """Function importing a function"""
    from os import open