httptools icon indicating copy to clipboard operation
httptools copied to clipboard

Static Type-checking for httptools

Open Vizonex opened this issue 1 year ago • 4 comments

I felt the need to add static type-checking to this library in order to help other programmers with using this library. I hope this pull request will help out a few people with using this library.

Vizonex avatar Jun 28 '24 22:06 Vizonex

On Wed, Jul 17, 2024 at 5:11 AM David Grigorenko @.***> wrote:

@.**** commented on this pull request.

In httptools/parser/url_parser.pyi https://github.com/MagicStack/httptools/pull/100#discussion_r1680795353:

@@ -0,0 +1,29 @@ +from typing import Union +from array import array

+class URL:

  • schema:bytes
  • host:bytes
  • port:int
  • path:bytes
  • query:bytes
  • fragment:bytes
  • userinfo:bytes

+def parse_url(url:Union[bytes, bytearray, memoryview, array]) -> URL:

I think you should add spaces after colons for type annotations

— Reply to this email directly, view it on GitHub https://github.com/MagicStack/httptools/pull/100#pullrequestreview-2182490074, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3K7GGVIXG426I4JPGQSNXDZMY7MVAVCNFSM6AAAAABKCSKGNSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDCOBSGQ4TAMBXGQ . You are receiving this because you authored the thread.Message ID: @.***>

Thanks for your input I will make sure that I add that in.

Vizonex avatar Jul 17 '24 15:07 Vizonex

@DABND19 could you take a look? thanks

KRRT7 avatar Nov 07 '24 19:11 KRRT7

@DABND19 could you take a look? thanks

Hi! I am not the maintainer of this repository, I just left my comments on this pull request :)

DABND19 avatar Dec 06 '24 10:12 DABND19

thanks for the help. I was off doing other things that I had forgotten about this completely.

Vizonex avatar Dec 08 '24 04:12 Vizonex