Closed elfkuzco closed 3 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
7948d6e
) to head (cfbabf7
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
scraperlib support python 3.8+ and this is not possible below 3.10 especially without future annotations
Ah we already had the future annotations !
Ah we already had the future annotations !
Yes, this PR was meant to supplement #140 by further removing Union
and Optional
which I believe are more difficult to read and understand than the pipe character which accomplishes the same function in type annotations.
For example, the line:
options: ClassVar[dict[str, str | bool | int | None]] = {}
is more simpler and readable than
options: ClassVar[dict[str, Optional[Union[str, bool, int]]]]
Rationale
To simplify the expressions for complex Union and Optional combinations using pipe (|) character
Changes
Optional
andUnion
types from thetyping
module to simpler forms using the pipe character