blob: 4ff22470cc99f80ecdb865422cff63c48ece684d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
"""Tests for used-before-assignment when postponed evaluation of annotations is enabled"""
# pylint: disable=missing-function-docstring, invalid-name
from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
var = 1
import math
print(var) # [used-before-assignment]
def function_one(m: math): # no error for annotations
return m
|