Update tooling (uv, ruff) and some cleanups#437
Merged
Conversation
5.1.1 is the latest (and only) version provided to Package Control currently.
Some automatic formatting is omitted because it is most definitely harder to read than the current version.
2c06e2c to
354f7f6
Compare
d23f14d to
e75fe05
Compare
There was a problem hiding this comment.
Pull request overview
This PR modernizes the Python/tooling setup (uv + ruff via pyproject.toml) and applies broad ruff-driven formatting/lint cleanups across the Sublime Text plugin code and packaged syntax/test resources, along with multiple spelling fixes and CI workflow updates.
Changes:
- Add
pyproject.toml+uv.lockand switch CI linting from Flake8 touv run ruff check .. - Apply ruff formatting/import ordering and small refactors across plugin modules.
- Fix typos/spelling across syntax definitions, completions metadata, and release notes.
Reviewed changes
Copilot reviewed 53 out of 54 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Adds uv lockfile capturing pinned dependencies/dev tools. |
| pyproject.toml | Defines project metadata + ruff configuration and dependency groups. |
| plugins/theme_dev.py | Import cleanup and minor formatting adjustments. |
| plugins/syntaxtest_dev.py | Ruff formatting, regex flag naming, and minor code cleanup. |
| plugins/syntax_dev/highlighter.py | Import consolidation and formatting updates. |
| plugins/syntax_dev/completions.py | Formatting refactors and modernization of string formatting. |
| plugins/syntax_dev_legacy.py | Import reordering/formatting and modernization in legacy syntax tooling. |
| plugins/snippet_dev.py | Import ordering + f-string constant formatting. |
| plugins/settings/known_settings.py | Formatting refactors, minor modernization, and helper cleanup. |
| plugins/settings/init.py | Import consolidation, formatting, and minor string formatting updates. |
| plugins/open_package.py | Formatting and minor list comprehension cleanup. |
| plugins/new_resource_file/templates.py | Formatting tweak (tuple item trailing comma). |
| plugins/new_resource_file/init.py | Minor string formatting updates and slicing spacing. |
| plugins/lib/weakmethod.py | Formatting and minor docstring cleanup. |
| plugins/lib/view_utils.py | Formatting, docstring tightening, and small error message modernization. |
| plugins/lib/syntax_paths.py | Formatting and explicit fmt on/off region for aligned constants. |
| plugins/lib/scope_data/init.py | Minor formatting cleanup and small string formatting tweak. |
| plugins/lib/ordereddict_yaml.py | Import ordering, formatting, and minor modernization. |
| plugins/lib/fileconv/tests/strip_js_comments.py | Print formatting cleanup in test utility script. |
| plugins/lib/fileconv/plist_parser.py | Modernization/typing additions and formatting in plist parser. |
| plugins/lib/fileconv/loaders.py | Formatting and minor modernization (f-strings/regex). |
| plugins/lib/fileconv/dumpers.py | Adds __future__ annotations, typing, and formatting modernization. |
| plugins/lib/init.py | Minor spacing/formatting cleanup. |
| plugins/file_conversion.py | Adds typing + refactors target_list setup and formatting. |
| plugins/create_package.py | Formatting and f-string modernization. |
| plugins/command_completions/yaml_omap.py | Import ordering, formatting, and error message modernization. |
| plugins/command_completions/commandinfo.py | Formatting and decorator adjustments for caching helpers. |
| plugins/command_completions/init.py | Formatting, import ordering, and snippet f-string refactors. |
| plugins/color_scheme_dev.py | Formatting and f-string modernization. |
| plugins/ac_triggers_workaround.py | Removes stray whitespace and formatting cleanup. |
| plugins/init.py | Formatting and f-string modernization in diagnostics helper. |
| Package/TextMate Syntax Definition (YAML)/TextMate Syntax Definition (YAML).YAML-tmLanguage | Spelling fix in comment. |
| Package/TextMate Syntax Definition (YAML)/Oniguruma Regular Expression.YAML-tmLanguage | Fixes scope name typo (contol → control). |
| Package/TextMate Syntax Definition (YAML)/Oniguruma Regular Expression.tmLanguage | Fixes scope name typo (contol → control). |
| Package/TextMate Syntax Definition (JSON)/TextMate Syntax Definition (JSON).tmLanguage | Fixes scope name typo (sytax → syntax). |
| Package/TextMate Syntax Definition (JSON)/TextMate Syntax Definition (JSON).JSON-tmLanguage | Fixes scope name typo (sytax → syntax). |
| Package/Sublime Text Theme/Sublime Text Theme.sublime-syntax | Spelling fix in comment. |
| Package/Sublime Text Syntax Definition/syntax_test_sublime-syntax.yaml | Updates expected scope assertions for YAML directive token. |
| Package/Sublime Text Syntax Definition/Sublime Text Syntax Definition.sublime-syntax | Comment spelling fixes. |
| Package/Sublime Text Snippet/syntax_test_snippet.xml | Spelling fix and assertion alignment update. |
| Package/Sublime Text Keymap/Completions/Context Key Values.sublime-completions | Spelling fixes in completion details. |
| Package/Sublime Text Commands/Completions/Main Keys (in-string).sublime-completions | Spelling fix in completion details. |
| Package/Sublime Text Color Scheme/Completions/Globals Keys.sublime-completions | Spelling fix in completion details. |
| Package/Sublime Text Color Scheme/Completions/Globals Keys (in-string).sublime-completions | Spelling fix in completion details. |
| Package/Sublime Text Build System/Completions/Exec Keys.sublime-completions | Spelling fix in completion details. |
| Package/Sublime Text Build System/Completions/Exec Keys (in-string).sublime-completions | Spelling fix in completion details. |
| Package/Property List/Property List.sublime-syntax | Spelling fixes in comments. |
| messages/3.7.0.txt | Adds release notes for v3.7.0 including ST build requirement note. |
| messages/2.0.0.txt | Spelling fix in historical release notes. |
| .github/workflows/syntax.yml | Updates syntax test matrix and bumps actions used. |
| .github/workflows/lint.yml | Replaces Flake8 workflow with uv+ruff-based linting. |
| .github/dependabot.yml | Adds dependabot configuration for GitHub Actions updates. |
| .gitattributes | Marks uv.lock as export-ignore. |
| _logging.py | Formatting and spelling fix in comment. |
Comments suppressed due to low confidence (1)
plugins/lib/fileconv/plist_parser.py:234
- These type annotations use
dict[str, ...], which raisesTypeError: 'type' object is not subscriptableon Python 3.8 at import time (unlessfrom __future__ import annotationsis enabled). Since the project targets Python >=3.8, the annotations should be made 3.8-safe (e.g., quote them or switch totyping.Dict).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Update tooling to define a
pyproject.tomlfile with basic info, Python version and some dev tools. Apply lint fixes and formatting using ruff (and replace flake8) and also fix spelling.