Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can just use `@app.get` and name your function whatever you like, just like FastAPI, if you prefer.

Although I don't see why flake8 should care - multi-dispatch is built into the python stdlib so having multiple functions with the same name is not weird or new.



Thanks for the info. In general, being compliant with established conventions (even if you don't personally like them) can lower the barrier of entry for some people who may superficially reject your library based on esthetic concerns.

If you'd like to dig deeper, the reference is:

    F811 redefinition of unused 'get' from line xx 
from flake8 and

    error: Name "get" already defined on line xx  [no-redef]
from mypy.


But you would have these 'get' functions in different modules though, so how would it be a 'redefinition'?




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: