Skip to content

Add an exception for N802 for BaseHTTPRequestHandler subclasses' methods #9400

@ZeeD

Description

@ZeeD

According to the doc you should use BaseHTTPRequestHandler subclassing it and implementing various do_SPAM methods, one for each request method.
But if in this basic snippet

from http.server import BaseHTTPRequestHandler
class MyRequestHandler(BaseHTTPRequestHandler):
    def do_GET(self) -> None: ...

ruff raises the error

N802 Function name `do_GET` should be lowercase

I would suggest to add an exception for the various do_XXX methods of the subclasses of BaseHTTPRequestHandler

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions