Skip to content

fix(mypy): infer fields declared through Env subclasses - #50

Open
florentinl wants to merge 18 commits into
mainfrom
fix/mypy-env-subclasses
Open

florentinl wants to merge 18 commits into
mainfrom
fix/mypy-env-subclasses

Conversation

@florentinl

@florentinl florentinl commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Description

Infer declared field types through Env subclasses, so configuration values can be returned directly and incompatible assignments are rejected. Resolve inherited declaration helpers while preserving overridden methods and reordered keyword arguments.

Indirect subclasses receive field inference without expanding the existing nested-configuration rewrite.

Testing

All 96 tests pass locally on Python 3.10 with mypy 1.15.0. Focused regressions cover the four declaration helpers, optional types, aliases, generic subclasses, forward references, runtime type values and their unions, and overridden methods. Formatting, linting, and typing checks pass.

Risks

None; typing-only change.

@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Pipelines

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 4042a87 | Docs | Give us feedback!

@florentinl
florentinl changed the base branch from main to fix/ci-tool-compatibility October 27, 2026 08:04
@florentinl
florentinl added this pull request to stack #52 October 27, 2026 08:34
@florentinl florentinl changed the title fix(mypy): support Env subclasses fix(mypy): infer fields declared through Env subclasses Oct 27, 2026
@florentinl
florentinl marked this pull request as ready for review October 27, 2026 09:01
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T13:16:16.000573Z 4042a87 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@florentinl
florentinl requested a review from P403n1x87 October 27, 2026 09:01

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2288314aa5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread envier/mypy.py Resolved
@florentinl
florentinl marked this pull request as draft October 27, 2026 11:20
@florentinl
florentinl marked this pull request as ready for review October 27, 2026 14:20

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 48c9d8f96d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread envier/mypy.py Resolved
Comment thread envier/mypy.py Resolved
@florentinl
florentinl marked this pull request as draft October 27, 2026 14:31
Base automatically changed from fix/ci-tool-compatibility to main October 27, 2026 15:25
@florentinl
florentinl removed this pull request from stack #52 October 27, 2026 15:26
@florentinl
florentinl marked this pull request as ready for review October 28, 2026 10:23

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 693e4a2e65

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread envier/mypy.py Resolved
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.

1 participant