-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Use UV_PYTHON to set python version in tests (#714)
* ci: Use UV_PYTHON to set python version in tests * Use old annotations in test_descriptor.py
- Loading branch information
Showing
5 changed files
with
35 additions
and
41 deletions.
There are no files selected for viewing
This file contains 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 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 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 +1 @@ | ||
3.11 | ||
3.12 |
This file contains 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 |
---|---|---|
|
@@ -5,14 +5,12 @@ build-backend = "hatchling.build" | |
[project] | ||
name = "anywidget" | ||
description = "custom jupyter widgets made easy" | ||
authors = [ | ||
{ name = "Trevor Manz", email = "[email protected]" } | ||
] | ||
authors = [{ name = "Trevor Manz", email = "[email protected]" }] | ||
license = { text = "MIT" } | ||
dynamic = ["version"] | ||
readme = "README.md" | ||
requires-python = ">=3.8" | ||
dependencies = [ | ||
dependencies = [ | ||
"ipywidgets>=7.6.0", | ||
"typing-extensions>=4.2.0", | ||
"psygnal>=0.8.1", | ||
|
@@ -69,9 +67,7 @@ skip-if-exists = [ | |
"anywidget/nbextension/index.js", | ||
"anywidget/labextension/package.json", | ||
] | ||
dependencies = [ | ||
"hatch-jupyter-builder>=0.5.0", | ||
] | ||
dependencies = ["hatch-jupyter-builder>=0.5.0"] | ||
|
||
[tool.hatch.build.hooks.jupyter-builder.build-kwargs] | ||
npm = "pnpm" | ||
|
@@ -91,20 +87,24 @@ exclude = ["packages", "docs"] | |
pydocstyle = { convention = "numpy" } | ||
select = ["ALL"] | ||
ignore = [ | ||
"D401", # First line should be in imperative mood (remove to opt in) | ||
"D401", # First line should be in imperative mood (remove to opt in) | ||
"COM812", # Missing trailing comma (conflicts with ruff format) | ||
"ISC001", # Import sorting (conflicts with ruff format) | ||
"FIX002", # Fixable issue | ||
"DOC201", # TODO(manzt) enable in follow-up PR; no doc for return type. | ||
"FBT", # TODO(manzt): enable in follow-up PR; require bool options to be keyword-only. | ||
"FBT", # TODO(manzt): enable in follow-up PR; require bool options to be keyword-only. | ||
] | ||
|
||
[tool.ruff.lint.per-file-ignores] | ||
"tests/*.py" = [ | ||
"D", # No docstrings in tests | ||
"S101", # Use of assert | ||
"B018", # "useless expression", for accessing the Foo._repr_mimbundle_ descriptor | ||
"D", # No docstrings in tests | ||
"S101", # Use of assert | ||
"B018", # "useless expression", for accessing the Foo._repr_mimbundle_ descriptor | ||
"SLF001", # Access private member | ||
"PLC2701" # Private imports | ||
] | ||
"tests/test_descriptor.py" = [ | ||
"FA100" # Don't add 'from __future__ import annotations' because it messes with Pydantic and ClassVar | ||
] | ||
"docs/*.py" = ["D"] | ||
|
||
|
@@ -131,7 +131,7 @@ exclude_lines = [ | |
"@overload", | ||
"except ImportError", | ||
"\\.\\.\\.", | ||
"raise NotImplementedError()" | ||
"raise NotImplementedError()", | ||
] | ||
|
||
# https://mypy.readthedocs.io/en/stable/config_file.html | ||
|
@@ -144,11 +144,11 @@ enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"] | |
warn_unreachable = true | ||
|
||
[[tool.mypy.overrides]] | ||
module = "anywidget.widget" # makes heavy use of traitlets, which is not typed | ||
module = "anywidget.widget" # makes heavy use of traitlets, which is not typed | ||
disallow_untyped_calls = false | ||
|
||
[[tool.mypy.overrides]] | ||
module = "anywidget._cellmagic" # makes heavy use of IPython, which is not typed | ||
module = "anywidget._cellmagic" # makes heavy use of IPython, which is not typed | ||
disallow_untyped_calls = false | ||
|
||
[[tool.mypy.overrides]] | ||
|
This file contains 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