diff --git a/.flake8 b/.flake8 deleted file mode 100644 index f96e993..0000000 --- a/.flake8 +++ /dev/null @@ -1,7 +0,0 @@ -[flake8] -exclude = ./docs/*, */migrations/*, ./pulpcore/plugin/docs/* -ignore = W503,Q000,Q003,D100,D104,D106,D200,D202,D205,D400,D401,D402 -# E203: whitespace before ':'; https://github.com/psf/black/issues/279 -# E401: multiple imports on one line -extend-ignore = E203,E401 -max-line-length = 100 diff --git a/.gitignore b/.gitignore index 4f58a78..66790aa 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,8 @@ __pycache__/ build/ tests/cli.toml +pytest_pulp_cli/GPG-PRIVATE-KEY-fixture-signing /.ci/settings/certs +site/ +dist/ +*.po~ diff --git a/lint_requirements.txt b/lint_requirements.txt index 5b97f1e..5553290 100644 --- a/lint_requirements.txt +++ b/lint_requirements.txt @@ -1,9 +1,9 @@ # Lint requirements -black==24.4.0 +black==24.4.2 flake8==7.0.0 flake8-pyproject==1.2.3 isort==5.13.2 -mypy==1.9.0 +mypy==1.10.0 shellcheck-py==0.10.0.1 # Type annotation stubs diff --git a/pyproject.toml b/pyproject.toml index 6ace937..826bafe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,12 +35,15 @@ changelog = "https://github.com/pulp/pulp-cli-gem/blob/main/CHANGES.md" gem = "pulpcore.cli.gem" [tool.setuptools.packages.find] +# This section is managed by the cookiecutter templates. where = ["."] include = ["pulpcore.cli.*"] namespaces = true [tool.setuptools.package-data] -"*" = ["py.typed", "locale/*/LC_MESSAGES/*.mo"] +# This section is managed by the cookiecutter templates. +"*" = ["py.typed"] + [tool.pulp_cli_template] # This section is co-managed by the cookiecutter templates. @@ -52,63 +55,65 @@ translations = false main_package = "gem" [tool.towncrier] +# This section is managed by the cookiecutter templates. filename = "CHANGES.md" directory = "CHANGES/" -title_format = "## {version} ({project_date})" +title_format = "## {version} ({project_date}) {{: #{version} }}" template = "CHANGES/.TEMPLATE.md" issue_format = "[#{issue}](https://github.com/pulp/pulp-cli-gem/issues/{issue})" start_string = "[//]: # (towncrier release notes start)\n" underlines = ["", "", ""] [[tool.towncrier.section]] +# This section is managed by the cookiecutter templates. path = "" name = "" [[tool.towncrier.section]] +# This section is managed by the cookiecutter templates. path = "pulp-glue-gem" name = "Pulp-gem GLUE" [[tool.towncrier.type]] +# This section is managed by the cookiecutter templates. directory = "feature" name = "Features" showcontent = true [[tool.towncrier.type]] +# This section is managed by the cookiecutter templates. directory = "bugfix" name = "Bugfixes" showcontent = true [[tool.towncrier.type]] -directory = "doc" -name = "Improved Documentation" -showcontent = true - -[[tool.towncrier.type]] +# This section is managed by the cookiecutter templates. directory = "removal" name = "Deprecations and Removals" showcontent = true [[tool.towncrier.type]] -directory = "translation" -name = "Translations" -showcontent = true - -[[tool.towncrier.type]] +# This section is managed by the cookiecutter templates. directory = "devel" name = "Developer Notes" showcontent = true [[tool.towncrier.type]] +# This section is managed by the cookiecutter templates. directory = "misc" name = "Misc" showcontent = false + [tool.black] +# This section is managed by the cookiecutter templates. line-length = 100 [tool.isort] +# This section is managed by the cookiecutter templates. profile = "black" line_length = 100 +skip = ["pulp-glue-gem"] [tool.pytest.ini_options] markers = [ @@ -118,15 +123,20 @@ markers = [ ] [tool.mypy] +# This section is managed by the cookiecutter templates. strict = true +warn_unused_ignores = false show_error_codes = true -files = "pulpcore/**/*.py" +files = "pulpcore/**/*.py, tests/*.py" namespace_packages = true explicit_package_bases = true [[tool.mypy.overrides]] +# This section is managed by the cookiecutter templates. module = [ "click_shell.*", + "gnupg.*", + "IPython.*", "schema.*", ] ignore_missing_imports = true @@ -143,6 +153,7 @@ serialize = [ ] [tool.bumpversion.parts.release] +# This section is managed by the cookiecutter templates. optional_value = "prod" values = [ "dev", @@ -150,26 +161,42 @@ values = [ ] [[tool.bumpversion.files]] +# This section is managed by the cookiecutter templates. filename = "./pulp-glue-gem/pulp_glue/gem/__init__.py" search = "__version__ = \"{current_version}\"" replace = "__version__ = \"{new_version}\"" [[tool.bumpversion.files]] +# This section is managed by the cookiecutter templates. filename = "./pulpcore/cli/gem/__init__.py" search = "__version__ = \"{current_version}\"" replace = "__version__ = \"{new_version}\"" [[tool.bumpversion.files]] +# This section is managed by the cookiecutter templates. filename = "./pulp-glue-gem/pyproject.toml" search = "version = \"{current_version}\"" replace = "version = \"{new_version}\"" [[tool.bumpversion.files]] +# This section is managed by the cookiecutter templates. filename = "./pyproject.toml" search = "version = \"{current_version}\"" replace = "version = \"{new_version}\"" [[tool.bumpversion.files]] +# This section is managed by the cookiecutter templates. filename = "./pyproject.toml" search = "\"pulp-glue-gem=={current_version}\"" replace = "\"pulp-glue-gem=={new_version}\"" + + +[tool.flake8] +# This section is managed by the cookiecutter templates. +exclude = ["./docs/*"] +ignore = ["W503", "Q000", "Q003", "D100", "D104", "D106", "D200", "D202", "D205", "D400", "D401", "D402"] +# E203: whitespace before ':'; https://github.com/psf/black/issues/279 +# E401: multiple imports on one line +extend-ignore = ["E203", "E401"] +max-line-length = 100 + diff --git a/tests/conftest.py b/tests/conftest.py index d632682..50e53aa 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,3 +1,4 @@ +import typing as t from urllib.parse import urljoin import pytest @@ -6,9 +7,9 @@ @pytest.fixture -def pulp_cli_vars(pulp_cli_vars): +def pulp_cli_vars(pulp_cli_vars: t.MutableMapping[str, str]) -> t.MutableMapping[str, str]: PULP_FIXTURES_URL = pulp_cli_vars["PULP_FIXTURES_URL"] - result = {} + result: t.MutableMapping[str, str] = {} result.update(pulp_cli_vars) result.update( {