summaryrefslogtreecommitdiff
path: root/tests/functional/r/redefined/redefined_builtin.py
blob: 47d4e35ba8e1a271b929b39f72b03ead72cea207 (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
27
"""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
from __future__ import print_function


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