Skip to content
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

STY: Enforce ruff/flake8-pyi rules (PYI) #1355

Merged
merged 2 commits into from
Sep 23, 2024
Merged

Conversation

DimitriPapadopoulos
Copy link
Contributor

No description provided.

Copy link

codecov bot commented Sep 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.34%. Comparing base (ddec715) to head (df862cc).
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1355   +/-   ##
=======================================
  Coverage   95.34%   95.34%           
=======================================
  Files         207      207           
  Lines       29494    29494           
  Branches     4978     4978           
=======================================
  Hits        28122    28122           
  Misses        932      932           
  Partials      440      440           

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

@@ -22,6 +22,7 @@
from types import TracebackType

from _typeshed import WriteableBuffer
from typing_extensions import Self
Copy link
Member

@effigies effigies Sep 22, 2024

Choose a reason for hiding this comment

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

Need to add this to dependencies. Should guard and import from typing for Python <3.11, and then we can use typing_extensions >=VER; python_version < '3.11'.

Ah, I see, it's in ty.TYPE_CHECKING guard. We should add to tox:

nibabel/tox.ini

Lines 172 to 186 in d1930e9

[testenv:typecheck]
description = Check type consistency
labels = check
deps =
mypy
pytest
types-setuptools
types-Pillow
pydicom
numpy
pyzstd
importlib_resources
skip_install = true
commands =
mypy nibabel

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add typing_extensions.

@effigies effigies merged commit 8c962e2 into nipy:master Sep 23, 2024
49 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.

2 participants