Skip to content

Commit 077c3cf

Browse files
committed
Removed unused code.
1 parent edf4e4f commit 077c3cf

2 files changed

Lines changed: 1 addition & 21 deletions

File tree

plain2code.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,12 @@
3737
PlainSyntaxError,
3838
)
3939
from plain2code_logger import (
40+
LOGGER_NAME,
4041
CrashLogHandler,
4142
IndentedFormatter,
42-
RetryOnlyFilter,
4343
TuiLoggingHandler,
4444
dump_crash_logs,
4545
get_log_file_path,
46-
LOGGER_NAME,
4746
)
4847
from plain2code_state import RunState
4948
from plain2code_utils import print_dry_run_output

plain2code_logger.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,6 @@
99
LOGGER_NAME = "codeplain"
1010

1111

12-
class RetryOnlyFilter(logging.Filter):
13-
def filter(self, record):
14-
# Allow all logs with level > DEBUG (i.e., INFO and above)
15-
if record.levelno > logging.DEBUG:
16-
return True
17-
# For DEBUG logs, only allow if message matches retry-related patterns
18-
msg = record.getMessage().lower()
19-
return (
20-
"retrying due to" in msg
21-
or "raising timeout error" in msg
22-
or "raising connection error" in msg
23-
or "encountered exception" in msg
24-
or "retrying request" in msg
25-
or "retry left" in msg
26-
or "1 retry left" in msg
27-
or "retries left" in msg
28-
)
29-
30-
3112
class IndentedFormatter(logging.Formatter):
3213
def format(self, record):
3314
original_message = record.getMessage()

0 commit comments

Comments
 (0)