Skip to content

Add Type checking to CI and correct mypy errors#183

Merged
jquast merged 15 commits intomasterfrom
jq/mypy-enforced-typecheck
Jan 23, 2026
Merged

Add Type checking to CI and correct mypy errors#183
jquast merged 15 commits intomasterfrom
jq/mypy-enforced-typecheck

Conversation

@jquast
Copy link
Copy Markdown
Owner

@jquast jquast commented Jan 23, 2026

  • duplicate sphinx docstring types removed
  • correct typing into .j2 template files, regenerate unicode_versions.py
  • tried to get autopep8 to reformat line length.. it didn't.
  • no code has changed, only annotations and comments.

supersedes / merged with #182

penguinolog and others added 2 commits January 23, 2026 14:53
Since minimal python version is 3.8:
 use `from __future__ import annotations`
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Jan 23, 2026

Merging this PR will not alter performance

✅ 38 untouched benchmarks


Comparing jq/mypy-enforced-typecheck (a7c6571) with master (7b46385)

Open in CodSpeed

it makes some bad types, like list_version() -> [str, str, str, str,
str, str, str, str, str, str, str, str, str], I can't prevent it.
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (7b46385) to head (a7c6571).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #183   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        13           
  Lines          597       604    +7     
  Branches       145       145           
=========================================
+ Hits           597       604    +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jquast jquast marked this pull request as ready for review January 23, 2026 17:37
@jquast jquast changed the title Add missing target, 'mypy' to linting step Add Type checking to CI and correct mypy errors Jan 23, 2026
@penguinolog
Copy link
Copy Markdown
Contributor

autopep8
Time to replace by ruff for formatting and linting. And imports sorting.

And move config to pyproject.toml

P.S. not in this PR, it's already big enough.

@jquast
Copy link
Copy Markdown
Owner Author

jquast commented Jan 23, 2026

maybe some other time, there are far more important things than to quibble with robots

@jquast jquast merged commit b79af79 into master Jan 23, 2026
43 checks passed
@jquast jquast deleted the jq/mypy-enforced-typecheck branch January 23, 2026 18:40
jquast added a commit that referenced this pull request Jan 23, 2026
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.

2 participants