Skip to content

chore(pre-commit): add ty pre-commit repo#57

Merged
sahiljhawar merged 4 commits intoGFZ:mainfrom
sahiljhawar:fix-ty-in-swvo
Feb 16, 2026
Merged

chore(pre-commit): add ty pre-commit repo#57
sahiljhawar merged 4 commits intoGFZ:mainfrom
sahiljhawar:fix-ty-in-swvo

Conversation

@sahiljhawar
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings February 16, 2026 10:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR integrates the ty type checker into the project’s developer workflow (pre-commit) and updates various inline ty suppression comments across the IO modules to match ty’s current rule naming.

Changes:

  • Update .pre-commit-config.yaml to use newer ruff-pre-commit and add the ty-pre-commit repository.
  • Add ty and ruff to requirements.txt.
  • Adjust multiple inline # ty: ignore[...] directives across the codebase (rule renames / new suppressions).

Reviewed changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
swvo/io/utils.py Updates a ty ignore rule for pandas index timestamp conversion.
swvo/io/solar_wind/swift.py Adds/updates ty ignores for Path(...) and DataFrame index typing.
swvo/io/solar_wind/dscovr.py Updates ty ignore rules for index/date attribute access and Path(...).
swvo/io/solar_wind/ace.py Updates ty ignore rules for index/date attribute access and Path(...).
swvo/io/omni/omni_low_res.py Adds ty ignore for Path(...) constructor argument typing.
swvo/io/omni/omni_high_res.py Adds ty ignores for Path(...) and DataFrame construction typing.
swvo/io/kp/swpc.py Updates ty ignore rules for regex match .group() and DataFrame index typing.
swvo/io/kp/omni.py Updates ty ignore rule for DatetimeIndex.hour access.
swvo/io/kp/niemegk.py Adds ty ignore for Path(...) constructor argument typing.
swvo/io/kp/ensemble.py Adds ty ignore for Path(...) constructor argument typing.
swvo/io/hp/gfz.py Adds ty ignore for Path(...) and removes an unnecessary ignore in exception handling.
swvo/io/hp/ensemble.py Adds ty ignore for Path(...) and removes ignores around numeric comparisons.
swvo/io/f10_7/swpc.py Adjusts ty ignores around pandas datetime/CSV parsing.
swvo/io/f10_7/omni.py Updates ty ignore rule for DatetimeIndex.hour access.
swvo/io/dst/wdc.py Adds ty ignore for float(...) argument typing during parsing.
swvo/io/RBMDataSet/scripts/create_RBSP_line_data.py Moves a ty ignore to the expression triggering the typing issue.
requirements.txt Adds ty and ruff dependencies.
.pre-commit-config.yaml Bumps ruff hook revision and adds ty pre-commit hook.
Comments suppressed due to low confidence (1)

.pre-commit-config.yaml:24

  • The ty-pre-commit hook is configured with language: system and a custom entry, which makes the repo/rev pin effectively irrelevant and requires contributors/CI to have ty installed globally. If the intent is to use the pinned pre-commit hook, drop the language: system override (and usually the custom entry) so pre-commit can manage the environment/version for ty-check.
  - repo: https://github.com/allganize/ty-pre-commit
    rev: v0.0.17
    hooks:
      - id: ty-check
        name: Type check
        entry: ty check .
        language: system
        types: [python]

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sahiljhawar sahiljhawar merged commit 39828a4 into GFZ:main Feb 16, 2026
17 of 18 checks passed
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