Skip to content

Fix bugs found by code quality scans#906

Open
sreckoskocilic wants to merge 6 commits intofman-users:mainfrom
sreckoskocilic:main
Open

Fix bugs found by code quality scans#906
sreckoskocilic wants to merge 6 commits intofman-users:mainfrom
sreckoskocilic:main

Conversation

@sreckoskocilic
Copy link
Copy Markdown

@sreckoskocilic sreckoskocilic commented May 2, 2026

I forked this repo in order to build myself a new fman version. Prior to making any build I ran the code-quality-scans performed by claude AI. This PR contains some fixes for the most critical things found in the scan.

  • The comma-separated return creates a 7-element tuple instead of comparing two tuples, every equality check returns True
  • master -> main branch fix
  • prepare_trash now calls self.move_to_trash instead of self.delete, so plugin subclasses won't permanently delete files when the user expects trashing
  • NotImplementedError - unrecognized platforms fail fast with a clear message instead of a cryptic NameError
  • removed shadowing basename import
  • get_column_widths uses range so plugin-added columns get their widths saved/restored
  • 2 failing tests fix
  • all pending plugin errors are now shown at startup instead of just the first one
  • command_registry.py — _set_context now uses try/finally so cm.exit always runs, even on exception.
  • util/qt/init.py — Added missing c_void_p import from ctypes, fixing a macOS runtime crash.
  • table.py — Fixed off-by-one: bounds check now rejects len + 1 correctly.
  • widgets.py — Added null guard on _main_window before accessing it in state change handler.
  • util/path.py — normalize now loops until all .. segments are resolved, so a/b/c/../../d correctly becomes a/d.
  • session.py — Removed dead _get_startup_message method (duplicated by _show_startup_messages)

…paring two tuples, every equality check returns True

- master -> main branch fix
- prepare_trash now calls self.move_to_trash instead of self.delete, so plugin subclasses won't permanently delete files when the user expects trashing
- NotImplementedError - unrecognized platforms fail fast with a clear message instead of a cryptic NameError
- removed shadowing basename import
- get_column_widths uses range so plugin-added columns get their widths saved/restored
…it__ always runs, even on exception.

  - util/qt/__init__.py — Added missing c_void_p import from ctypes, fixing a macOS runtime crash.
  - table.py — Fixed off-by-one: bounds check now rejects len + 1 correctly.
  - widgets.py — Added null guard on _main_window before accessing it in state change handler.
…ved, so a/b/c/../../d correctly becomes a/d.

  - session.py — Removed dead _get_startup_message method (duplicated by _show_startup_messages)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant