Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2024-Q3/Q4: Code climate #1912

Open
3 of 41 tasks
stanislaw opened this issue Jul 7, 2024 · 0 comments
Open
3 of 41 tasks

2024-Q3/Q4: Code climate #1912

stanislaw opened this issue Jul 7, 2024 · 0 comments

Comments

@stanislaw
Copy link
Collaborator

stanislaw commented Jul 7, 2024

Previous: #1770
Next: TBD



        pygmented_source_file_lines: List[Union[str, RangeMarkerTuple]] = list(

This is for mypy... Honestly I don't understand why we have to make a list()-copy of pygmented_source_file_content.split("\n"). Without list(), mypy would claim

error: Incompatible types in assignment (expression has type "List[str]", variable has type "List[Union[str, RangeMarkerTuple]]")

I know assignment would be a problem without explicit annotation of pygmented_source_file_lines because of list invariance. But the annotation is there... why do we still need list()?

@stanislaw stanislaw added this to the 2024-Q3 milestone Jul 7, 2024
@stanislaw stanislaw mentioned this issue Jul 7, 2024
8 tasks
@stanislaw stanislaw changed the title 2024-Q3: Code climate 2024-Q3/Q4: Code climate Oct 13, 2024
@stanislaw stanislaw modified the milestones: 2024-Q3, 2024-Q4 Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant