-
Notifications
You must be signed in to change notification settings - Fork 3
Updates based on repo-review report #163
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
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
0ed1939
Remove license classifier since set in project metadata
rlskoeser 2d706d5
Switch to optional dependency group for dev/test deps
rlskoeser b0a2ec6
Fix uv group syntax
rlskoeser 7bafd28
Update install instructions for change to dependency groups
rlskoeser ee6800e
Use uv for docs install; update to use dependency groups
rlskoeser 2d80ebd
Configure pytest as recommended by repo-review
rlskoeser 6f41e3d
Update pre-commit config to get more help
rlskoeser 677aa5b
Fix typos and misspellings caught by codespell
rlskoeser 02ac0bb
Fix bad indentation in readthedocs config
rlskoeser 401e549
Consolidate pytest configurations
rlskoeser 59a5965
Fix pytest config & correctly set minimum version
rlskoeser 70f5ce3
Set actions to cancel in progress for concurrency
rlskoeser c14fb37
Pin convertdate version to avoid deprecation warning / syntax change
rlskoeser 737dd5d
Configure dependabot to update github actions & pre-commit hooks
rlskoeser 67985cd
Configure dependabot to group commits
rlskoeser 76ed1da
Configure ruff to sort imports; use to fix existing code
rlskoeser 535054e
Enable and fix more ruff rules
rlskoeser a11a376
Enable and apply ruff check for pathlib use
rlskoeser ffb9652
Configure & apply more ruff fixes
rlskoeser 6a89566
Configure and apply last set of ruff checks & fixes
rlskoeser 89ded9b
Update github action to use ruff check/format actions
rlskoeser ee28651
Limit ruff format to check src & tests (not example notebooks)
rlskoeser 8b0d650
Also limit ruff check to src & tests
rlskoeser 82c78fc
Update pre-commit tool versions with autoupdate
rlskoeser 708478b
Use newer versions of actions
rlskoeser 3fa7de7
Clean up notebooks for github actions ruff check
rlskoeser 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
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,27 @@ | ||
| # To get started with Dependabot version updates, you'll need to specify which | ||
| # package ecosystems to update and where the package manifests are located. | ||
| # Please see the documentation for all configuration options: | ||
| # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
|
||
| version: 2 | ||
| updates: | ||
| # Enable version updates for GitHub Actions | ||
| - package-ecosystem: "github-actions" | ||
| groups: | ||
| actions: | ||
| patterns: | ||
| - "*" | ||
| directory: "/" | ||
| schedule: | ||
| # Check for updates to GitHub Actions every week | ||
| interval: "weekly" | ||
|
|
||
| # Enable version updates for pre-commit hooks | ||
| - package-ecosystem: "pre-commit" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| groups: | ||
| pre-commit: | ||
| patterns: | ||
| - "*" |
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
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 |
|---|---|---|
| @@ -1,22 +1,46 @@ | ||
| files: \.py | ||
| repos: | ||
| # ruff for linting and formatting python | ||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: v0.3.4 | ||
| rev: v0.15.12 | ||
| hooks: | ||
| - id: ruff | ||
| args: [ --fix, --exit-non-zero-on-fix ] | ||
| - id: ruff-check | ||
| args: [ --fix, --show-fixes, --exit-non-zero-on-fix ] | ||
| - id: ruff-format | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v4.3.0 | ||
| rev: v6.0.0 | ||
| hooks: | ||
| - id: check-case-conflict | ||
| - id: check-merge-conflict | ||
| - id: check-executables-have-shebangs | ||
| - id: debug-statements | ||
| - id: end-of-file-fixer | ||
| - id: mixed-line-ending | ||
| - id: trailing-whitespace | ||
| - id: check-yaml | ||
| - id: name-tests-test | ||
| args: [--pytest-test-first] | ||
|
|
||
| - repo: https://github.com/pre-commit/mirrors-mypy | ||
| rev: v1.13.0 | ||
| rev: v2.0.0 | ||
| hooks: | ||
| - id: mypy | ||
| additional_dependencies: [numpy] | ||
| # yamlfmt for formatting YAML files | ||
| - repo: https://github.com/google/yamlfmt | ||
| rev: v0.21.0 | ||
| hooks: | ||
| - id: yamlfmt | ||
| # Codespell for spell checking | ||
| - repo: https://github.com/codespell-project/codespell | ||
| rev: v2.4.2 | ||
| hooks: | ||
| - id: codespell | ||
| additional_dependencies: | ||
| - tomli | ||
| exclude_types: ["css", "html", "javascript", "json"] | ||
| # Validate GitHub Actions workflow files | ||
| - repo: https://github.com/mpalmer/action-validator | ||
| rev: v0.9.0 | ||
| hooks: | ||
| - id: action-validator | ||
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
pre-commit config top-level files regex semantics default applied to hooks💡 Result:
In pre-commit's .pre-commit-config.yaml, top-level 'files' and 'exclude' options are Python regular expressions matched against file paths relative to the repository root using re.search semantics (substring match anywhere in the path, not full path anchored unless ^/$ used). - 'files': optional global include pattern (default: empty string ''). An empty regex matches all files (re.search('', path) succeeds for any path). - 'exclude': optional global exclude pattern (default: '^$', which matches only empty strings, excluding nothing). These apply before hook-level filters. Global 'files' selects candidates, then global 'exclude' removes matches from them, then hook-specific 'files'/'exclude' etc. apply. Hook-level 'files'/'exclude' use the same regex semantics. Source: Official pre-commit docs confirm defaults and top-level application; regex section explicitly states "The patterns for files and exclude are python regular expressions and are matched with re.search." Examples show multiline (?x) regexes for complex patterns.
Citations:
🏁 Script executed:
Repository: dh-tech/undate-python
Length of output: 1716
Critical: top-level
files: \.pysilently disables every new non-Python hook.The global
filesregex on line 1 applies to every hook that does not override it.check-merge-conflict,check-yaml,yamlfmt,codespell, andaction-validatorhave no localfilesoverrides and will only match files ending in.py, rendering them no-ops—these tools are meant to validate YAML, workflows, text, and merge conflicts, not Python source.Remove the top-level filter (recommended—individual hooks already declare
types/types_orappropriately) or overridefilesper-hook that needs non-Python coverage.Proposed fix
-files: \.py repos:If a subset of existing hooks really did need to be restricted to
*.py, re-declarefiles:on those individual hooks instead of globally.📝 Committable suggestion
🤖 Prompt for AI Agents