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

🔥 remove the codemods #462

Merged
merged 1 commit into from
Feb 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .libcst.codemod.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions codegen/README.md

This file was deleted.

Empty file removed codegen/__init__.py
Empty file.
168 changes: 0 additions & 168 deletions codegen/mods.py

This file was deleted.

35 changes: 3 additions & 32 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ dependencies = ["optype>=0.9.1"]
[dependency-groups]
extras = ["scipy-stubs[scipy]"]
ci = ["packaging>=24.2"]
codegen = ["libcst>=1.6.0,<2"]
mdformat = [
"mdformat>=0.7.22",
"mdformat-gfm>=0.4.1",
Expand All @@ -63,7 +62,6 @@ lint = [
type = [
{include-group = "extras"},
{include-group = "ci"},
{include-group = "codegen"},
"basedmypy[faster-cache]>=2.9.1",
"basedpyright>=1.27.1",
]
Expand All @@ -84,8 +82,6 @@ packages = ["scipy-stubs"]
[tool.poe.tasks.clean]
cmd = """
rm -rf
codegen/*.pyc
codegen/__pycache__
scipy-stubs/**/*.pyc
scipy-stubs/**/__pycache__
scripts/*.pyc
Expand All @@ -109,28 +105,13 @@ uv run --no-editable
"""
args = [{name = "modules", positional = true, multiple = true, default = "scipy"}]

[tool.poe.tasks.codemod]
cmd = """
python -m libcst.tool
codemod
-x
--hide-progress
--include-stubs
codegen.mods.$name
$path
"""
args = [
{name = "name", positional = true, multiple = false, required = true},
{name = "path", positional = true, multiple = false, default = "scipy-stubs"},
]


[tool.typos.files]
extend-exclude = ["*.pyi", ".mypyignore"]


[tool.mypy]
files = ["codegen/**/*.py", "scripts/**/*.py", "tests/**/*.py", "scipy-stubs/**/*.pyi"]
files = ["scripts/**/*.py", "tests/**/*.py", "scipy-stubs/**/*.pyi"]
exclude = ['^\.git$', '^\.ruff_cache$', '^\.tox$']
python_version = "3.10"
plugins = ["numpy.typing.mypy_plugin"]
Expand All @@ -144,7 +125,7 @@ enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]


[tool.pyright]
include = ["scipy-stubs", "codegen", "scripts", "tests"]
include = ["scipy-stubs", "scripts", "tests"]
ignore = [".venv"]
venv = ".venv"
venvPath = "."
Expand Down Expand Up @@ -181,16 +162,6 @@ root = "scipy-stubs"
reportInvalidStubStatement = true
reportUnusedCallResult = true

[[executionEnvironments]]
root = "codegen"
reportAny = true # based
reportExplicitAny = true # based
reportInvalidStubStatement = true
reportPrivateUsage = true
reportUnreachable = true
reportUnsafeMultipleInheritance = true # based
reportUnusedCallResult = true

[[executionEnvironments]]
root = "tests"
reportAny = true # based
Expand All @@ -213,7 +184,7 @@ ignore = [


[tool.ruff]
src = ["scipy-stubs", "codegen", "scripts"]
src = ["scipy-stubs", "scripts"]
extend-exclude = [".venv", ".git", ".mypy_cache", ".tox"]
force-exclude = true
# https://typing.readthedocs.io/en/latest/guides/writing_stubs.html#maximum-line-length
Expand Down
47 changes: 0 additions & 47 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading