Skip to content
This repository was archived by the owner on Oct 17, 2024. It is now read-only.
This repository was archived by the owner on Oct 17, 2024. It is now read-only.

pyproject-fmt unstable (2.0.4) #18

Closed
@adamtheturtle

Description

@adamtheturtle

If I run pyproject-fmt pyproject.toml I get quite a big change. If I then run it again, I get a small diff.

pyproject.toml
[tool.pylint]

    [tool.pylint.'MASTER']

    # Pickle collected data for later comparisons.
    persistent = true

    # Use multiple processes to speed up Pylint.
    jobs = 0

    # List of plugins (as comma separated values of python modules names) to load,
    # usually to register additional checkers.
    # See https://chezsoi.org/lucas/blog/pylint-strict-base-configuration.html.
    # We do not use the plugins:
    # - pylint.extensions.code_style
    # - pylint.extensions.magic_value
    # - pylint.extensions.while_used
    # as they seemed to get in the way.
    load-plugins = [
        'pylint.extensions.bad_builtin',
        'pylint.extensions.comparison_placement',
        'pylint.extensions.consider_refactoring_into_while_condition',
        'pylint.extensions.docparams',
        'pylint.extensions.dunder',
        'pylint.extensions.eq_without_hash',
        'pylint.extensions.for_any_all',
        'pylint.extensions.mccabe',
        'pylint.extensions.no_self_use',
        'pylint.extensions.overlapping_exceptions',
        'pylint.extensions.private_import',
        'pylint.extensions.redefined_loop_name',
        'pylint.extensions.redefined_variable_type',
        'pylint.extensions.set_membership',
        'pylint.extensions.typing',
	]

    [tool.pylint.'MESSAGES CONTROL']

    # Enable the message, report, category or checker with the given id(s). You can
    # either give multiple identifier separated by comma (,) or put this option
    # multiple time (only on the command line, not in the configuration file where
    # it should appear only once). See also the "--disable" option for examples.
    enable = [
        'bad-inline-option',
        'deprecated-pragma',
        'file-ignored',
        'spelling',
        'use-symbolic-message-instead',
        'useless-suppression',
    ]


    # Disable the message, report, category or checker with the given id(s). You
    # can either give multiple identifiers separated by comma (,) or put this
    # option multiple times (only on the command line, not in the configuration
    # file where it should appear only once).You can also use "--disable=all" to
    # disable everything first and then reenable specific checks. For example, if
    # you want to run only the similarities checker, you can use "--disable=all
    # --enable=similarities". If you want to run only the classes checker, but have
    # no Warning level messages displayed, use"--disable=all --enable=classes
    # --disable=W"

    disable = [
        # Style issues that we can deal with ourselves
        'too-few-public-methods',
        'too-many-ancestors',
        'too-many-locals',
        'too-many-arguments',
        'too-many-instance-attributes',
        'too-many-return-statements',
        'too-many-lines',
        'too-many-statements',
        'locally-disabled',
        # Let flake8 handle long lines
        'line-too-long',
        # Let flake8 handle unused imports
        'unused-import',
        # Let isort deal with sorting
        'ungrouped-imports',
        # We don't need everything to be documented because of mypy
        'missing-type-doc',
        'missing-return-type-doc',
        # Too difficult to please
        'duplicate-code',
        # Let isort handle imports
        'wrong-import-order',
    ]

    [tool.pylint.'FORMAT']

    # Allow the body of an if to be on the same line as the test if there is no
    # else.
    single-line-if-stmt = false

    [tool.pylint.'SPELLING']

    # Spelling dictionary name. Available dictionaries: none. To make it working
    # install python-enchant package.
    spelling-dict = 'en_US'

    # A path to a file that contains private dictionary; one word per line.
    spelling-private-dict-file = 'spelling_private_dict.txt'

    # Tells whether to store unknown words to indicated private dictionary in
    # --spelling-private-dict-file option instead of raising a message.
    spelling-store-unknown-words = 'no'

[tool.coverage.run]

branch = true

[tool.coverage.report]

exclude_also =  [
  "if TYPE_CHECKING:",
  "class .*\\bProtocol\\):",
]

[tool.pytest.ini_options]

xfail_strict = true
log_cli = true
addopts = ["--strict-markers"]
markers = ["requires_docker_build"]

# Options for pytest-retry.
retries = 10
retry_delay = 10
cumulative_timing = false

[tool.check-manifest]

ignore = [
  "*.enc",
  "admin/**",
  "readthedocs.yaml",
  "CHANGELOG.rst",
  "CODE_OF_CONDUCT.rst",
  "CONTRIBUTING.rst",
  "LICENSE",
  "Makefile",
  "ci",
  "ci/**",
  "codecov.yaml",
  "docs",
  "docs/**",
  ".git_archival.txt",
  "spelling_private_dict.txt",
  "tests",
  "tests/**",
  "vuforia_secrets.env.example",
  "lint.mk",
  "src/mock_vws/_flask_server/Dockerfile",
  "secrets.tar.gpg",
]

[tool.mypy]

strict = true
plugins = ["pydantic.mypy"]

[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true

[tool.doc8]

max_line_length = 2000
ignore_path = [
    "./.eggs",
    "./docs/build",
    "./docs/build/spelling/output.txt",
    "./node_modules",
    "./src/*.egg-info/",
    "./src/*/_setuptools_scm_version.txt",
]

[tool.setuptools_scm]

# We use a fallback version like
# https://github.com/pypa/setuptools_scm/issues/77 so that we do not
# error in the Docker build stage of the release pipeline.
#
# This must be a PEP 440 compliant version.
fallback_version = "0.0.0"

[build-system]
build-backend = "setuptools.build_meta"
requires = [
    "pip",
    "setuptools",
    "setuptools_scm[toml]==7.1",
    "wheel",
]

[tool.ruff]
line-length = 79
target-version = "py311"

[tool.ruff.lint]
select = ["ALL"]

ignore = [
    # We do not annotate the type of 'self', or 'cls'.
    "ANN101",
    "ANN102",
    # Ruff warns that this conflicts with the formatter.
    "COM812",
    # Allow our chosen docstring line-style - no one-line summary.
    "D200",
    "D205",
    "D212",
    "D415",
    # Ruff warns that this conflicts with the formatter.
    "ISC001",
    # Ignore "too-many-*" errors as they seem to get in the way more than
    # helping.
    "PLR0913",
    # Allow 'assert' in tests as it is the standard for pytest.
    # Also, allow 'assert' in other code as it is the standard for Python type hint
    # narrowing - see
    # https://mypy.readthedocs.io/en/stable/type_narrowing.html#type-narrowing-expressions.
    "S101",
]

# Do not automatically remove commented out code.
# We comment out code during development, and with VSCode auto-save, this code
# is sometimes annoyingly removed.
unfixable = ["ERA001"]

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.lint.per-file-ignores]
"tests/**" = [
    # Allow possible hardcoded passwords in tests.
    "S105",
    "S106",
]

[tool.distutils.bdist_wheel]
universal = true

[project]
name = "vws-python-mock"
description = "A mock for the Vuforia Web Services (VWS) API."
readme = { file = "README.rst", content-type = "text/x-rst"}
keywords = [
    "client",
    "fake",
    "mock",
    "vuforia",
    "vws",
]
license = { file = "LICENSE" }
authors = [ { name = "Adam Dangoor", email = "adamdangoor@gmail.com"} ]
requires-python = ">=3.12"
classifiers = [
    "Development Status :: 5 - Production/Stable",
    "Environment :: Web Environment",
    "Framework :: Pytest",
    "License :: OSI Approved :: MIT License",
    "Operating System :: POSIX",
    "Programming Language :: Python :: 3 :: Only",
    "Programming Language :: Python :: 3.12",
]
dynamic = [
    "version",
]
dependencies = [
    "flask",
    "Pillow",
    "piq",
    "pydantic-settings",
    "requests",
    "requests-mock",
    "torchvision",
    'tzdata; sys_platform == "win32"',
    "vws-auth-tools",
    "Werkzeug",
]
[project.optional-dependencies]
dev = [
    "actionlint-py==1.6.27.13",
    "check-manifest==0.49",
    "check-wheel-contents==0.6.0",
    "deptry==0.16.1",
    "dirty-equals==0.7.1.post0",
    "doc8==1.1.1",
    "docker==7.0.0",
    "enum-tools[sphinx]==0.12.0",
    "freezegun==1.5.1",
    "furo==2024.5.6",
    "mypy==1.10.0",
    "pydocstyle==6.3",
    "pyenchant==3.2.2",
    "pylint==3.1.0",
    "pyproject-fmt==2.0.4",
    "pyright==1.1.362",
    "pyroma==4.2",
    "pytest==8.2.0",
    "pytest-cov==5.0.0",
    "pytest-retry==1.6.2",
    "pytest-xdist==3.6.1",
    "python-dotenv==1.0.1",
    "PyYAML==6.0.1",
    "requests-mock-flask==2023.5.14",
    "ruff==0.4.4",
    "Sphinx==7.3.7",
    "sphinx-prompt==1.8",
    "Sphinx-Substitution-Extensions==2024.2.25",
    "sphinx-toolbox==3.5",
    "sphinx_paramlinks==0.6",
    "sphinxcontrib-httpdomain==1.8.1",
    "sphinxcontrib-spelling==8",
    "sybil==6.1.1",
    "tenacity==8.3.0",
    "torch==2.3.0",
    "types-docker==7.0.0.20240513",
    "types-Pillow==10.2.0.20240511",
    "types-PyYAML==6.0.12.20240311",
    "types-requests==2.31.0.20240406",
    "urllib3==2.2.1",
    "vulture==2.11",
    "vws-python==2024.2.19",
    "VWS-Test-Fixtures==2023.3.5",
    "vws-web-tools==2023.12.26",
]
[project.urls]
Documentation = "https://vws-python-mock.readthedocs.io"
Source = "https://github.com/VWS-Python/vws-python-mock"

[tool.setuptools]
zip-safe = false

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools.package-data]
mock_vws = ["py.typed"]

[tool.pyproject-fmt]
indent = 4
keep_full_version = true

[tool.pyright]
reportUnnecessaryTypeIgnoreComment = true
typeCheckingMode = "strict"

[tool.deptry]
pep621_dev_dependency_groups = ["dev"]

[tool.deptry.per_rule_ignores]
# tzdata is needed on Windows for zoneinfo to work.
# See https://docs.python.org/3/library/zoneinfo.html#data-sources.
DEP002 = ["tzdata"]

Small second diff:

--- pyproject.toml

+++ pyproject.toml

@@ -95,6 +95,7 @@

 ]
 urls.Documentation = "https://vws-python-mock.readthedocs.io"
 urls.Source = "https://github.com/VWS-Python/vws-python-mock"
+
 [tool.setuptools]
 zip-safe = false

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions