diff --git a/Makefile b/Makefile index 9479391..e9ddc22 100644 --- a/Makefile +++ b/Makefile @@ -28,21 +28,19 @@ build: clean deps format: @# Do not analyse .gitignored files. @# `make` needs `$$` to output `$`. Ref: http://stackoverflow.com/questions/2382764. - black `git ls-files | grep "\.py$$"` + ruff format `git ls-files | grep "\.py$$"` isort `git ls-files | grep "\.py$$"` pyproject-fmt pyproject.toml - ruff format `git ls-files | grep "\.py$$"` lint: @# Do not analyse .gitignored files. @# `make` needs `$$` to output `$`. Ref: http://stackoverflow.com/questions/2382764. - black --check `git ls-files | grep "\.py$$"` isort --check `git ls-files | grep "\.py$$"` ruff check `git ls-files | grep "\.py$$"` yamllint `git ls-files | grep "\.yaml$$"` test: clean - PYTEST_ADDOPTS="--import-mode importlib" openfisca test --country-package openfisca_country_template openfisca_country_template/tests + openfisca test --country-package openfisca_country_template openfisca_country_template/tests serve-local: build openfisca serve --country-package openfisca_country_template diff --git a/pyproject.toml b/pyproject.toml index aec4605..ee8ae04 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,6 @@ dependencies = [ "openfisca-core[web-api]>=43", ] optional-dependencies.dev = [ - "black>=24.8,<25", "isort>=5.13.2,<6", "pyproject-fmt>=2.3.1,<3", "ruff>=0.6.9,<1", @@ -40,9 +39,6 @@ urls.Homepage = "https://github.com/openfisca/country-template" urls.Issues = "https://github.com/openfisca/country-template/issues" urls.Repository = "https://github.com/openfisca/country-template" -[tool.black] -target_version = [ "py39", "py310", "py311" ] - [tool.ruff] target-version = "py39" format.docstring-code-line-length = 72 @@ -97,7 +93,7 @@ indent = 4 max_supported_python = "3.11" [tool.pytest.ini_options] -addopts = "--exitfirst --showlocals --doctest-modules --disable-warnings" +addopts = "--exitfirst --showlocals --doctest-modules --disable-warnings --import-mode importlib" testpaths = [ "openfisca_country_template/tests" ] python_files = "**/*.py"