remove old and unused "tracing" code (#625)

Signed-off-by: lb1107039128 <liubo1@xfusion.com>
This commit is contained in:
lb1107039128 2024-01-26 10:58:41 +08:00
parent 8a3ba5c12a
commit 25f1847b4e
2 changed files with 47 additions and 1 deletions

View File

@ -0,0 +1,42 @@
From da197ee94e791640d82940396c19d2d82ca8defb Mon Sep 17 00:00:00 2001
From: Terence Honles <terence@honles.com>
Date: Thu, 20 May 2021 07:47:19 -0700
Subject: [PATCH] remove old and unused "tracing" code (#625)
---
pyflakes/checker.py | 5 -----
1 file changed, 5 deletions(-)
diff --git a/pyflakes/checker.py b/pyflakes/checker.py
index 48d3841..135ad33 100644
--- a/pyflakes/checker.py
+++ b/pyflakes/checker.py
@@ -868,7 +868,6 @@ class Checker(object):
nodeDepth = 0
offset = None
- traceTree = False
_in_annotation = AnnotationState.NONE
_in_deferred = False
@@ -1393,8 +1392,6 @@ class Checker(object):
if self.offset and getattr(node, 'lineno', None) is not None:
node.lineno += self.offset[0]
node.col_offset += self.offset[1]
- if self.traceTree:
- print(' ' * self.nodeDepth + node.__class__.__name__)
if self.futuresAllowed and not (isinstance(node, ast.ImportFrom) or
self.isDocstring(node)):
self.futuresAllowed = False
@@ -1406,8 +1403,6 @@ class Checker(object):
handler(node)
finally:
self.nodeDepth -= 1
- if self.traceTree:
- print(' ' * self.nodeDepth + 'end ' + node.__class__.__name__)
_getDoctestExamples = doctest.DocTestParser().get_examples
--
2.42.0.windows.2

View File

@ -3,7 +3,7 @@
Pyflakes A simple program which checks Python source files for errors.Pyflakes
Name: python-pyflakes
Version: 2.3.1
Release: 3
Release: 4
Summary: passive checker of Python programs
License: MIT
URL: https://github.com/PyCQA/pyflakes
@ -14,6 +14,7 @@ BuildArch: noarch
Patch0001: 0001-Detect-typing-module-attributes-with-import-typing-a.patch
Patch0002: 0001-fix-typo-annoation-annotation-636.patch
Patch0003: 0001-remove-old-and-unused-tracing-code-625.patch
%package -n python3-pyflakes
Summary: passive checker of Python programs
@ -79,6 +80,9 @@ mv %{buildroot}/doclist.lst .
%{_docdir}/*
%changelog
* Fri Jan 26 2024 liubo <liubo1@xfusion.com> - 2.3.1-4
- remove old and unused "tracing" code (#625)
* Fri Jan 19 2024 liubo <liubo1@xfusion.com> - 2.3.1-3
- fix typo: annoation -> annotation (#636)