Skip to content

Tool bump #19

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

Merged
merged 9 commits into from
Apr 18, 2025
Merged

Tool bump #19

merged 9 commits into from
Apr 18, 2025

Conversation

covracer
Copy link
Collaborator

@covracer covracer commented Apr 17, 2025

Update tooling

Older twine check didn't like newer metadata version 2.4 being generated. Accidentally upgraded everything else.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 11 out of 16 changed files in this pull request and generated 1 comment.

Files not reviewed (5)
  • .tool-versions: Language not supported
  • Dockerfile: Language not supported
  • MANIFEST.in: Language not supported
  • includes.sh: Language not supported
  • requirements.in: Language not supported
Comments suppressed due to low confidence (1)

pyproject.toml:2

  • The empty string in backend-path may lead to unresolved module paths. Confirm that an empty string is intentional and works correctly with the new pypi_compatible_build backend.
backend-path = ['']

'django-stubs',
'djangorestframework-stubs[compatible-mypy]',
# hadolint git link in requirements.in
'hadolint-py @ git+https://github.com/AleksaC/hadolint-py.git',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like doing this in mypy:

enable_error_code = [
    "ignore-without-code",
    "mutable-override",
    "redundant-cast",
    "redundant-expr",
    "redundant-self",
    "truthy-bool",
    "truthy-iterable",
    "unimported-reveal",
    "unreachable",
    "unused-awaitable",
    "unused-ignore",
]

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sharing @jamesbraza. I tried them out.

How would you deal with this?

allowedflare/django.py:80: error: Covariant override of a mutable attribute (base class "TemplateResponseMixin" defined the type as "str | None", expression has type "str")  [mutable-override]

Based on some of the discussion in python/mypy#3208 I tried template_name: Final[str] = 'login.html' but that just changed the error to:

allowedflare/django.py:80: error: Cannot override writable attribute "template_name" with a final one  [misc]


import setuptools
from packaging.metadata import Metadata
from setuptools._core_metadata import _write_requirements # type: ignore[import-untyped]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you have this if you have types-setuptools?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the stubs don't cover _core_metadata https://github.com/python/typeshed/tree/main/stubs/setuptools/setuptools

@covracer covracer merged commit afa5408 into main Apr 18, 2025
3 checks passed
@covracer covracer deleted the toolbump branch April 18, 2025 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants