-
Notifications
You must be signed in to change notification settings - Fork 34
Flake to ruff #84
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
Merged
Merged
Flake to ruff #84
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7ff9d47
Moved changelog into its own file and added changelog reminder.
semohr 226e455
Removed flask8 in favor of ruff.
semohr 7dd82de
Added gitblameignore, add contributing guide,
semohr 96bffcb
zhs contribution guide copy paste
semohr 32dc6c1
Enhanced changelog
semohr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # Migrated to ruff | ||
| 7ff9d471b23c45b6d957e7507035af39885546ab |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| name: Verify changelog updated | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| types: | ||
| - opened | ||
| - ready_for_review | ||
|
|
||
| jobs: | ||
| check_changes: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Get all updated Python files | ||
| id: changed-python-files | ||
| uses: tj-actions/changed-files@v46 | ||
| with: | ||
| files: | | ||
| **.py | ||
|
|
||
| - name: Check for the changelog update | ||
| id: changelog-update | ||
| uses: tj-actions/changed-files@v46 | ||
| with: | ||
| files: docs/changelog.rst | ||
|
|
||
| - name: Comment under the PR with a reminder | ||
| if: steps.changed-python-files.outputs.any_changed == 'true' && steps.changelog-update.outputs.any_changed == 'false' | ||
| uses: thollander/actions-comment-pull-request@v2 | ||
| with: | ||
| message: "Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry." | ||
| GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Contributing to mediafile | ||
|
|
||
|
|
||
| First off, thanks for taking the time to contribute! ❤️ | ||
|
|
||
| Please follow these guidelines to ensure a smooth contribution process. | ||
|
|
||
| ## Pre-requisites | ||
|
|
||
| - Python 3.9 or higher | ||
| - Git | ||
|
|
||
| ## Setup the Development Environment | ||
|
|
||
| 1. Fork/Clone the repository on GitHub | ||
| ```bash | ||
| git clone <your-fork-url> | ||
| cd mediafile | ||
| ``` | ||
| 2. Install dependencies and set up the development environment | ||
| ```bash | ||
| pip install -e .[dev] | ||
| ``` | ||
|
|
||
| ## Before submitting a Pull Request | ||
|
|
||
| Verify that your code adheres to the project standards and conventions. Run | ||
| ruff and pytest to ensure your code is properly formatted and all tests pass. | ||
|
|
||
| ```bash | ||
| ruff check . | ||
| ruff format . | ||
| pytest . | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| Changelog | ||
| --------- | ||
|
|
||
| Upcoming | ||
| ''''''' | ||
semohr marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - Dropped support for Python 3.7 and 3.8 | ||
semohr marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| v0.13.0 | ||
| ''''''' | ||
|
|
||
| - Add a mapping compatible with Plex and ffmpeg for the "original date" | ||
| fields. | ||
| - Remove an unnecessary dependency on `six`. | ||
| - Replace `imghdr` with `filetype` to support Python 3.13. | ||
|
|
||
| v0.12.0 | ||
| ''''''' | ||
|
|
||
| - Add the multiple-valued properties ``artists_credit``, ``artists_sort``, | ||
| ``albumartists_credit``, and ``albumartists_sort``. | ||
|
|
||
| v0.11.0 | ||
| ''''''' | ||
|
|
||
| - List-valued properties now return ``None`` instead of an empty list when the | ||
| underlying tags are missing altogether. | ||
|
|
||
| v0.10.1 | ||
| ''''''' | ||
|
|
||
| - Fix a test failure that arose with Mutagen 1.46. | ||
| - Require Python 3.7 or later. | ||
|
|
||
| v0.10.0 | ||
| ''''''' | ||
|
|
||
| - Add the multiple-valued properties ``albumtypes``, ``catalognums`` and | ||
| ``languages``. | ||
| - The ``catalognum`` property now refers to additional file tags named | ||
| ``CATALOGID`` and ``DISCOGS_CATALOG`` (but only for reading, not writing). | ||
| - The multi-valued ``albumartists`` property now refers to additional file | ||
| tags named ``ALBUM_ARTIST`` and ``ALBUM ARTISTS``. (The latter | ||
| is used only for reading.) | ||
| - The ``ListMediaField`` class now doesn't concatenate multiple lists if | ||
| found. The first available tag is used instead, like with other kinds of | ||
| fields. | ||
|
|
||
| v0.9.0 | ||
| '''''' | ||
|
|
||
| - Add the properties ``bitrate_mode``, ``encoder_info`` and | ||
| ``encoder_settings``. | ||
|
|
||
| v0.8.1 | ||
| '''''' | ||
|
|
||
| - Fix a regression in v0.8.0 that caused a crash on Python versions below 3.8. | ||
|
|
||
| v0.8.0 | ||
| '''''' | ||
|
|
||
| - MediaFile now requires Python 3.6 or later. | ||
| - Added support for Wave (`.wav`) files. | ||
|
|
||
| v0.7.0 | ||
| '''''' | ||
|
|
||
| - Mutagen 1.45.0 or later is now required. | ||
| - MediaFile can now use file-like objects (instead of just the filesystem, via | ||
| filenames). | ||
|
|
||
| v0.6.0 | ||
| '''''' | ||
|
|
||
| - Enforce a minimum value for SoundCheck gain values. | ||
|
|
||
| v0.5.0 | ||
| '''''' | ||
|
|
||
| - Refactored the distribution to use `Flit`_. | ||
|
|
||
| .. _Flit: https://flit.readthedocs.io/ | ||
|
|
||
| v0.4.0 | ||
| '''''' | ||
|
|
||
| - Added a ``barcode`` field. | ||
| - Added new tag mappings for ``albumtype`` and ``albumstatus``. | ||
|
|
||
| v0.3.0 | ||
| '''''' | ||
|
|
||
| - Fixed tests for compatibility with Mutagen 1.43. | ||
| - Fix the MPEG-4 tag mapping for the ``label`` field to use the right | ||
| capitalization. | ||
|
|
||
| v0.2.0 | ||
| '''''' | ||
|
|
||
| - R128 gain tags are now stored in Q7.8 integer format, as per | ||
| `the relevant standard`_. | ||
| - Added an ``mb_workid`` field. | ||
| - The Python source distribution now includes an ``__init__.py`` file that | ||
| makes it easier to run the tests. | ||
|
|
||
| .. _the relevant standard: https://tools.ietf.org/html/rfc7845.html#page-25 | ||
|
|
||
| v0.1.0 | ||
| '''''' | ||
|
|
||
| This is the first independent release of MediaFile. | ||
| It is now synchronised with the embedded version released with `beets`_ v1.4.8. | ||
|
|
||
| .. _beets: https://beets.io | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.