Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/gui type hintsAdd GUI type hints to improve code readability #1260

Open
wants to merge 71 commits into
base: feature/gui-type-hints
Choose a base branch
from

Conversation

mvnpavan88
Copy link

Description of Changes:

Resolved merge conflicts in image_viewer.py and preferences_dialog.py.
Updated the implementation to improve code clarity by adding type hints in key functions.
Ensured consistency across GUI components by applying proper naming conventions and handling of preferences.
Reason for Changes:

These changes enhance code readability and maintainability.
Type hints make it easier for other developers to understand the expected types of variables and function parameters.
Improved consistency helps in future development and debugging efforts.
Testing:

Changes have been tested locally to ensure that all functionalities are intact.
No new errors or warnings were introduced after the modifications.
Additional Notes:

These changes are part of an ongoing effort to improve the codebase as per the project's contribution guidelines.

arsenetar and others added 30 commits June 30, 2022 23:03
- Add protection for empty hash digests in comparison of non-zero size
  files
- Bump version to 4.3.1-dev for identification
- Move the try/except of cache db calls to the calls themselves.
- Add some additional information to logging statements on cache db
  exception to improve troubleshooting.
fix mispelled translation
it's a tiny bit faster and saves a bit of memory
For some reason flake8 is now throwing W503, which should be disabled by
default, adding to extend-ignore fixes it, so doing that for now.
- Add option to include file existence check at end of scan, speeds up
  end of scan operation time considerably, however if user has removed
  or moved files since starting a scan there could be later errors when
  interacting with results.  Defaults to existing behavior of including
  the check, until it can be verified later dialogs and actions handle
  non-existent items better.
- Add option to ignore differences in mtime when checking hash cache.
  Option is present in advanced tab of preferences.  Closes arsenetar#1022.
- Regenerate pot files for translations
- Implement a confirmation dialog for cancellation of jobs, required
  changing from QProgressDialog to QDialog to keep cleaner.
- Update ui translation source file

Close arsenetar#1033, arsenetar#515
- Remove shelve picture cache as it has had a fair number of historical
  issues.  Original issue for which it was added should be long
  resolved.  Additionally this allows additional consolidation of the
  various cache code and potentially dbs in the future.
- Remove all related preferences and related code for changing cache
  backend between sqlite and shelve.
- Add exclude pattern for flake8 when running with pre-commit as it does
  not fully honor the exclude paths.
- Cleanup exclude paths for flake8 in tox.ini
- Re-enable line length check and correct three affected files
- Remove trailing whitespace
- Correct single newline at end of files (skip for json)
- Update to formatting in a few places due to black
feat: Add pre-commit, include python 3.11 in tests
- Remove lock on read operations, only needed for write operations
- Change to use context manager for sqlite connection
- Remove long lived cursor object and use short lived cursors instead

Fixes arsenetar#1080
- Add "safe" existence check to files which catches OSErrors that may
  occur when trying to stat files
- Use "safe" existence check during final existence check
Last change introduced a new method on the fs.File object that the test
object did not have.  Add similar method to test object.
arsenetar and others added 30 commits April 27, 2023 02:25
Upgrade required dependency versions for most dependencies.  Add maximum
version to most dependencies as well.
I have updated my fork and moved my changes from before.
- Update NullJob to subclass Job
- Remove unnecessary size pre-read in _getMatches() as file sizes are
  already loaded during file scan via stat call
- Skip ref check if contents scan as the scan already prevents this from
  happening, some of the other scans do things differently and need to
  be reviewed before removing this post step completely
- Add guard on partial hashing to just hash the whole file if smaller
  than the offset and size and use the value for both the partial digest
  and digest
RE: Rewrote some of the korean translation to be more understandable
sphinx 7.0.0 was released on April 29th.
Python 3.6 support was already dropped in commit b9dfeac ("Drop Python
3.6 Support"). Don't attempt to run tests with it if it is installed.

Python 3.11 is currently supported, so add it to the list.
send2trash is provided by the python-send2trash package in the 'extra'
repository.
Do not package send2trash on Arch Linux
Update python versions in tox.ini
Use isolation_level=None mode for GNU Hurd
* match all orientations

* use rotation as option

---------

Co-authored-by: Andrew Senetar <[email protected]>
Co-authored-by: Luke <[email protected]>
Original PR and information found at arsenetar#1187
- Add additional settings to VS Code for formatter changes in plugins
- Fix black formatting
- Fix flake8 errors due to long lines
- Fix flake8 errors due to type comparisons
Update .pre-commit-config.yaml to use the latest versions of black,
flake8, etc.
- Correct bad query introduced in rotation matching
- Promote get_orientation from "private" on photo class
- Fix prepare_pictures to only generate the needed blocks, add check for missing blocks when rotation matchin is true
- Fix cache test inputs to match schema
- Merge the resulting artifacts
- Use only the .so files from build
* Create longest and shortest path criteria
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.