Repository Analysis

Delgan/loguru

21.0 Moderate AI signal View on GitHub
21.0
Adjusted Score
21.0
Raw Score
100%
Time Factor
Last Push
Stars
Language
26,280
Lines of Code
284
Files
511
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 11LOW 500

Pattern Findings

511 matches across 7 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers413 hits · 435 pts
SeverityFileLineSnippet
LOWtests/test_colorama.py44def test_stream_wrapped_on_windows_if_no_vt_support(patched, monkeypatch, patch_colorama):
LOWtests/test_colorama.py56def test_stream_not_wrapped_on_windows_if_vt_support(patched, monkeypatch, patch_colorama):
LOWtests/test_colorama.py110def test_github_actions_fixed(monkeypatch, patched, expected):
LOWtests/test_colorama.py130def test_mintty_fixed_windows(monkeypatch, patched, expected):
LOWtests/test_colorama.py148def test_dumb_term_not_colored(monkeypatch, patched, expected):
LOWtests/test_colorama.py173def test_honor_no_color_standard(monkeypatch, patched, no_color, expected):
LOWtests/test_colorama.py198def test_honor_force_color_standard(monkeypatch, patched, force_color, expected):
LOWtests/test_colorama.py206def test_no_color_takes_precedence_over_force_color(monkeypatch):
LOWtests/test_colorama.py232def test_mintty_not_fixed_linux(monkeypatch, patched, expected):
LOWtests/test_colorama.py295def test_dont_wrap_if_not_original_stdout_or_stderr(monkeypatch, patched, patch_colorama):
LOWtests/test_colorama.py305def test_dont_wrap_if_terminal_has_vt_support(monkeypatch, patched, patch_colorama):
LOWtests/test_colorama.py317def test_dont_wrap_if_winapi_false(monkeypatch, patched, patch_colorama):
LOWtests/test_colorama.py329def test_wrap_if_winapi_true_and_no_vt_support(monkeypatch, patched, patch_colorama):
LOWtests/test_colorama.py342def test_wrap_if_winapi_true_and_vt_check_fails(monkeypatch, patched, patch_colorama):
LOWtests/test_colorama.py355def test_wrap_if_winapi_true_and_stream_has_no_fileno(monkeypatch, patched, patch_colorama):
LOWtests/test_colorama.py367def test_wrap_if_winapi_true_and_old_colorama_version(monkeypatch, patched, patch_colorama):
LOWtests/test_filesink_rotation.py1122def test_invalid_day_rotation(rotation):
LOWtests/test_filesink_rotation.py1130def test_invalid_time_rotation(rotation):
LOWtests/test_filesink_rotation.py1136def test_invalid_value_size_rotation(rotation):
LOWtests/test_filesink_rotation.py1142def test_invalid_unit_rotation_duration(rotation):
LOWtests/test_filesink_rotation.py1148def test_invalid_value_rotation_duration(rotation):
LOWtests/test_filesink_rotation.py191def test_time_rotation_with_tzinfo_diff_bigger(freeze_time, tmp_path):
LOWtests/test_filesink_rotation.py214def test_time_rotation_with_tzinfo_diff_lower(freeze_time, tmp_path):
LOWtests/test_filesink_rotation.py237def test_time_rotation_with_tzinfo_utc(freeze_time, tmp_path):
LOWtests/test_filesink_rotation.py263def test_time_rotation_multiple_days_at_midnight_utc(freeze_time, tmp_path):
LOWtests/test_filesink_rotation.py295def test_daily_rotation_with_different_timezone(freeze_time, tmp_path, offset):
LOWtests/test_filesink_rotation.py333def test_time_rotation_after_positive_timezone_changes_forward(freeze_time, tmp_path, rotation):
LOWtests/test_filesink_rotation.py360def test_time_rotation_when_positive_timezone_changes_forward(freeze_time, tmp_path, rotation):
LOWtests/test_filesink_rotation.py396def test_time_rotation_after_negative_timezone_changes_forward(freeze_time, tmp_path, rotation):
LOWtests/test_filesink_rotation.py423def test_time_rotation_when_negative_timezone_changes_forward(freeze_time, tmp_path, rotation):
LOWtests/test_filesink_rotation.py457def test_time_rotation_after_positive_timezone_changes_backward_aware(
LOWtests/test_filesink_rotation.py486def test_time_rotation_after_positive_timezone_changes_backward_naive(
LOWtests/test_filesink_rotation.py524def test_time_rotation_after_negative_timezone_changes_backward_aware(
LOWtests/test_filesink_rotation.py553def test_time_rotation_after_negative_timezone_changes_backward_naive(
LOWtests/test_filesink_rotation.py583def test_time_rotation_when_timezone_changes_backward_rename_file(freeze_time, tmp_path):
LOWtests/test_filesink_rotation.py619def test_dont_rotate_earlier_when_utc_is_one_day_before(freeze_time, tmp_path, rotation):
LOWtests/test_filesink_rotation.py654def test_dont_rotate_later_when_utc_is_one_day_after(freeze_time, tmp_path, rotation):
LOWtests/test_filesink_rotation.py680def test_rotation_at_midnight_with_date_in_filename(freeze_time, tmp_path, timezone):
LOWtests/test_filesink_rotation.py702def test_time_rotation_reopening_native(tmp_path_local, delay):
LOWtests/test_filesink_rotation.py758def test_time_rotation_reopening_xattr_attributeerror(tmp_path_local, monkeypatch, delay):
LOWtests/test_filesink_rotation.py794def test_time_rotation_reopening_xattr_oserror(tmp_path_local, monkeypatch, delay):
LOWtests/test_filesink_rotation.py823def test_time_rotation_windows_no_setctime(tmp_path, monkeypatch):
LOWtests/test_filesink_rotation.py847def test_time_rotation_windows_setctime_exception(tmp_path, monkeypatch, exception):
LOWtests/test_filesink_rotation.py915def test_no_rotation_at_remove(tmp_path, mode):
LOWtests/test_filesink_rotation.py923def test_rename_existing_with_creation_time(freeze_time, tmp_path):
LOWtests/test_filesink_rotation.py939def test_renaming_rotation_dest_exists(freeze_time, tmp_path):
LOWtests/test_filesink_rotation.py957def test_renaming_rotation_dest_exists_with_time(freeze_time, tmp_path):
LOWtests/test_filesink_rotation.py977def test_exception_during_rotation(tmp_path, capsys):
LOWtests/test_filesink_rotation.py996def test_exception_during_rotation_not_caught(tmp_path, capsys):
LOWtests/test_filesink_rotation.py1015def test_recipe_rotation_both_size_and_time(freeze_time, tmp_path):
LOWtests/test_filesink_rotation.py1062def test_multiple_rotation_conditions(freeze_time, tmp_path):
LOWtests/test_filesink_rotation.py1087def test_empty_rotation_condition_list():
LOWtests/test_filesink_rotation.py1095def test_invalid_rotation_type(rotation):
LOWtests/test_add_option_serialize.py29def test_serialize_non_ascii_characters():
LOWtests/test_add_option_serialize.py60def test_serialize_exception_without_context():
LOWtests/test_add_option_serialize.py77def test_serialize_exception_none_tuple():
LOWtests/test_add_option_serialize.py94def test_serialize_exception_instance():
LOWtests/test_add_option_serialize.py111def test_serialize_with_catch_decorator():
LOWtests/test_add_option_serialize.py127def test_serialize_with_record_option():
LOWtests/test_add_option_serialize.py137def test_serialize_not_serializable():
353 more matches not shown…
Excessive Try-Catch Wrapping63 hits · 80 pts
SeverityFileLineSnippet
LOWtests/test_opt.py68 except Exception:
LOWtests/test_opt.py82 except Exception:
LOWtests/test_opt.py98 except Exception:
LOWtests/test_opt.py114 except Exception:
LOWtests/test_interception.py110 except Exception:
LOWtests/test_add_option_diagnose.py10 except Exception:
LOWtests/test_add_option_diagnose.py20 except Exception:
LOWtests/test_exceptions_catch.py75 except Exception:
LOWtests/test_exceptions_catch.py91 except Exception:
LOWtests/test_add_option_enqueue.py263 except Exception:
LOWtests/test_add_option_enqueue.py286 except Exception:
LOWtests/test_propagation.py89 except Exception:
LOWtests/test_add_option_backtrace.py10 except Exception:
LOWtests/test_add_option_backtrace.py20 except Exception:
LOWtests/test_exceptions_formatting.py286 except Exception:
LOW…tions/source/backtrace/missing_lineno_frame_objects.py40except Exception as e:
LOWtests/exceptions/source/backtrace/nested_wrapping.py32except Exception:
LOW…exceptions/source/backtrace/nested_chained_catch_up.py23 except Exception as e:
MEDIUM…exceptions/source/backtrace/nested_chained_catch_up.py20def main():
LOWtests/exceptions/source/others/repeated_lines.py22except Exception:
LOWtests/exceptions/source/others/one_liner_recursion.py15except Exception:
LOWtests/exceptions/source/others/recursion_error.py20except Exception:
LOWtests/exceptions/source/others/nested_with_reraise.py21 except Exception as e:
MEDIUMtests/exceptions/source/others/nested_with_reraise.py18def bar(x, y):
LOWtests/exceptions/source/diagnose/chained_both.py16 except Exception:
LOWtests/exceptions/source/diagnose/chained_both.py23 except Exception as e:
MEDIUMtests/exceptions/source/diagnose/chained_both.py13def cause(x, y):
MEDIUMtests/exceptions/source/diagnose/chained_both.py20def context(x, y):
LOWtests/exceptions/source/modern/grouped_simple.py27 except Exception as error_1:
LOWtests/exceptions/source/modern/grouped_simple.py30 except Exception as error_2:
LOWtests/exceptions/source/modern/grouped_simple.py33 except Exception as error_3:
MEDIUMtests/exceptions/source/modern/grouped_simple.py24def main():
LOW…ptions/source/modern/grouped_with_cause_and_context.py18 except Exception as err:
LOW…ptions/source/modern/grouped_with_cause_and_context.py20 except Exception as err:
LOW…ptions/source/modern/grouped_with_cause_and_context.py25 except Exception as err:
LOW…ptions/source/modern/grouped_with_cause_and_context.py27 except Exception as err:
LOW…ptions/source/modern/grouped_with_cause_and_context.py32 except Exception as err:
LOW…ptions/source/modern/grouped_with_cause_and_context.py35 except Exception:
MEDIUM…ptions/source/modern/grouped_with_cause_and_context.py14def main():
LOWtests/exceptions/source/modern/grouped_nested.py18 except Exception as err:
LOWtests/exceptions/source/modern/grouped_nested.py23 except Exception as err:
LOWtests/exceptions/source/modern/grouped_nested.py30 except Exception as err:
MEDIUMtests/exceptions/source/modern/grouped_nested.py14def main():
LOW…ceptions/source/modern/grouped_as_cause_and_context.py21 except Exception as err:
LOW…ceptions/source/modern/grouped_as_cause_and_context.py26 except Exception as err:
LOW…ceptions/source/modern/grouped_as_cause_and_context.py32 except Exception as err:
LOW…ceptions/source/modern/grouped_as_cause_and_context.py34 except Exception as err:
MEDIUM…ceptions/source/modern/grouped_as_cause_and_context.py18def main():
LOWloguru/_better_exceptions.py345 except Exception:
MEDIUMloguru/_better_exceptions.py185def _get_char(self, char, default):
LOWloguru/_handler.py207 except Exception:
LOWloguru/_handler.py318 except Exception:
LOWloguru/_handler.py333 except Exception:
MEDIUMloguru/_handler.py127def emit(self, record, level_id, from_decorator, is_raw, colored_message):
LOWloguru/_colorama.py32 except Exception:
LOWloguru/_colorama.py53 except Exception:
LOWloguru/_colorama.py76 except Exception:
LOWloguru/_simple_sinks.py194 except Exception:
LOWloguru/_error_interceptor.py26 except Exception:
LOWloguru/_get_frame.py8 except Exception:
3 more matches not shown…
Deep Nesting15 hits · 15 pts
SeverityFileLineSnippet
LOWloguru/_better_exceptions.py64
LOWloguru/_better_exceptions.py202
LOWloguru/_better_exceptions.py267
LOWloguru/_better_exceptions.py353
LOWloguru/_better_exceptions.py393
LOWloguru/_colorizer.py222
LOWloguru/_colorizer.py416
LOWloguru/_colorizer.py477
LOWloguru/_handler.py127
LOWloguru/_file_sink.py377
LOWloguru/_logger.py261
LOWloguru/_logger.py1169
LOWloguru/_logger.py1873
LOWloguru/_logger.py2028
LOWloguru/_logger.py1306
Unused Imports12 hits · 12 pts
SeverityFileLineSnippet
LOWtests/exceptions/source/ownership/callback.py3
LOW…ts/exceptions/source/ownership/assertion_from_local.py3
LOW…ts/exceptions/source/ownership/assertion_from_local.py4
LOWtests/exceptions/source/ownership/assertion_from_lib.py3
LOWtests/exceptions/source/ownership/syntaxerror.py3
LOWtests/exceptions/source/ownership/decorated_callback.py3
LOWtests/exceptions/source/ownership/decorated_callback.py4
LOWtests/exceptions/source/ownership/catch_decorator.py3
LOWtests/exceptions/source/ownership/indirect.py3
LOW…xceptions/source/ownership/catch_decorator_from_lib.py3
LOWtests/exceptions/source/ownership/string_lib.py3
LOWtests/exceptions/source/ownership/direct.py3
Overly Generic Function Names3 hits · 4 pts
SeverityFileLineSnippet
LOWtests/test_multiprocessing.py26def do_something(i):
LOWtests/test_repr.py84def test_function():
LOWtests/test_repr.py85 def my_function(message):
Over-Commented Block3 hits · 3 pts
SeverityFileLineSnippet
LOWdocs/conf.py81# The theme to use for HTML and HTML Help pages. See the documentation for
LOWdocs/conf.py101# defined by theme itself. Builtin themes are using these templates by
LOWdocs/conf.py121 #
Slop Phrases2 hits · 2 pts
SeverityFileLineSnippet
LOWloguru/_logger.py769 Windows, don't forget to restart your terminal for the change to be taken into account.
LOWloguru/_logger.py1724 >>> logger.info("While publishing a library, don't forget to disable logging")