Skip to content

Conversation

hofrob
Copy link
Contributor

@hofrob hofrob commented Sep 29, 2025

Type of Changes

Type
🐛 Bug fix

Description

For the sake of completeness, pylint-dev/pylint#8859 is actually about older http status codes which were not part of #2839 or RFC9110 respectively. This PR adds 3 status codes to the HTTP brain:

  • 103 EARLY_HINTS
  • 418 IM_A_TEAPOT
  • 425 TOO_EARLY

closes pylint-dev/pylint#8859

@hofrob hofrob force-pushed the fix-add-missing-http-status-codes branch from d53d096 to b1cb9fc Compare September 29, 2025 13:00
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

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

I knew something was missing in the other MR :D

@Pierre-Sassoulas Pierre-Sassoulas added this to the 4.0.0 milestone Sep 29, 2025
@Pierre-Sassoulas Pierre-Sassoulas added the Brain 🧠 Needs a brain tip label Sep 29, 2025
Comment on lines +103 to +104
IM_A_TEAPOT = _HTTPStatus(418, 'I\\\'m a Teapot',
'Server refuses to brew coffee because it is a teapot.')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if you prefer "I'm a Teapot"? Both works.

Copy link
Member

Choose a reason for hiding this comment

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

You could apply black on the brain content and copy paste the result, that would make for a very clean brain. But honestly it doesn't matter much as long as astroid user get the right value :D

Copy link

codecov bot commented Sep 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.37%. Comparing base (3593863) to head (9cf582a).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2840   +/-   ##
=======================================
  Coverage   93.37%   93.37%           
=======================================
  Files          92       92           
  Lines       11148    11148           
=======================================
  Hits        10409    10409           
  Misses        739      739           
Flag Coverage Δ
linux 93.23% <ø> (ø)
pypy 93.37% <ø> (ø)
windows 93.35% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
astroid/brain/brain_http.py 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Pierre-Sassoulas Pierre-Sassoulas merged commit 92107a7 into pylint-dev:main Sep 29, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Brain 🧠 Needs a brain tip
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False positive no-member on http.HTTPStatus
2 participants