summaryrefslogtreecommitdiff
path: root/tests/functional/u/used/used_before_assignment_scoping.py
blob: 0d88210bdd1badfd660a84116e5f44e985d6ad84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# pylint: disable=missing-function-docstring, missing-module-docstring

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from datetime import datetime


def func_two():
    second = datetime.now()  # [used-before-assignment]
    return second


def func():
    first: datetime
    first = datetime.now()  # [used-before-assignment]
    second = datetime.now()
    return first, second