diff --git a/docs/pages/guides/style.md b/docs/pages/guides/style.md index 1484a81f..a8d278c1 100644 --- a/docs/pages/guides/style.md +++ b/docs/pages/guides/style.md @@ -765,9 +765,9 @@ And a noxfile entry: ```python @nox.session def pylint(session: nox.Session) -> None: - session.install("-e", ".") + session.install("-e.") session.install("pylint") - session.run("pylint", "src", *session.posargs) + session.run("pylint", "", *session.posargs) ``` And you can add this to your GitHub Actions using `run: pipx run nox -s pylint`. diff --git a/{{cookiecutter.project_name}}/noxfile.py b/{{cookiecutter.project_name}}/noxfile.py index 31942376..337a63c6 100644 --- a/{{cookiecutter.project_name}}/noxfile.py +++ b/{{cookiecutter.project_name}}/noxfile.py @@ -35,7 +35,7 @@ def pylint(session: nox.Session) -> None: # This needs to be installed into the package environment, and is slower # than a pre-commit check session.install(".", "pylint") - session.run("pylint", "src", *session.posargs) + session.run("pylint", "{{ cookiecutter.__project_slug }}", *session.posargs) @nox.session diff --git a/{{cookiecutter.project_name}}/pyproject.toml b/{{cookiecutter.project_name}}/pyproject.toml index a99fd15d..d7022fa1 100644 --- a/{{cookiecutter.project_name}}/pyproject.toml +++ b/{{cookiecutter.project_name}}/pyproject.toml @@ -326,7 +326,10 @@ isort.required-imports = ["from __future__ import annotations"] [tool.pylint] py-version = "3.8" -ignore-paths= ["src/{{ cookiecutter.__project_slug }}/_version.py"] +ignore-paths = [".*/_version.py"] +{%- if cookiecutter.__type == "compiled" %} +extension-pkg-allow-list = ["{{ cookiecutter.__project_slug }}._core"] +{%- endif %} reports.output-format = "colorized" similarities.ignore-imports = "yes" messages_control.disable = [ diff --git a/{{cookiecutter.project_name}}/{% if cookiecutter.__ci=='gitlab' %}.gitlab-ci.yml{% endif %} b/{{cookiecutter.project_name}}/{% if cookiecutter.__ci=='gitlab' %}.gitlab-ci.yml{% endif %} index 12507b52..e34e2455 100644 --- a/{{cookiecutter.project_name}}/{% if cookiecutter.__ci=='gitlab' %}.gitlab-ci.yml{% endif %} +++ b/{{cookiecutter.project_name}}/{% if cookiecutter.__ci=='gitlab' %}.gitlab-ci.yml{% endif %} @@ -81,7 +81,7 @@ tests: matrix: - IMAGE: ['python:3.8-buster', 'python:3.11-buster'] -{%- if not cookiecutter.__compiled %} +{%- if cookiecutter.__type == "pure" %} package: stage: build rules: @@ -141,7 +141,7 @@ make_wheels: .deploy: stage: deploy dependencies: - {%- if not cookiecutter.__compiled %} + {%- if cookiecutter.__type == "pure" %} - package {%- else %} - make_sdist