Skip to content

Commit aeb2789

Browse files
pre-commit-ci[bot]zenlyj
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 2ee2ead commit aeb2789

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Fix false negative for `used-before-assignment` when a `TYPE_CHECKING` import is used as a type annotation prior to erroneous usage.
22

3-
Refs #8893
3+
Refs #8893

pylint/checkers/variables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2009,7 +2009,7 @@ def _filter_type_checking_import_from_consumption(
20092009
self,
20102010
node: nodes.NodeNG,
20112011
nodes_to_consume: list[nodes.NodeNG],
2012-
is_reported: bool
2012+
is_reported: bool,
20132013
) -> list[nodes.NodeNG]:
20142014
"""Do not consume type-checking import node as used-before-assignment
20152015
may invoke in different scopes.

tests/functional/u/used/used_before_assignment_scoping.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ def func():
1515
first: datetime
1616
first = datetime.now() # [used-before-assignment]
1717
second = datetime.now()
18-
return first, second
18+
return first, second

0 commit comments

Comments
 (0)