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

Assorted Linting Errors #32

Open
simojo opened this issue Apr 29, 2024 · 1 comment · May be fixed by #33
Open

Assorted Linting Errors #32

simojo opened this issue Apr 29, 2024 · 1 comment · May be fixed by #33
Assignees
Labels
help wanted Extra attention is needed

Comments

@simojo
Copy link
Collaborator

simojo commented Apr 29, 2024

Description of Issue

The current code base needs the following linting errors resolved:

bosco/list_processing/combination.py:16: error: Incompatible return value type (got "List[Any]", expected "Tuple[Any]")
bosco/list_processing/search.py:22: error: Missing return statement
bosco/list_processing/search.py:76: error: Unsupported operand types for > ("int" and "Type[List[Any]]")
bosco/list_processing/search.py:76: error: Variable "pos" is not valid as a type
bosco/list_processing/search.py:76: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
bosco/list_processing/search.py:99: error: Argument 3 to "compute_recursive_binary_search" has incompatible type "float"; expected "int"
bosco/generate.py:16: error: List comprehension has incompatible type List[float]; expected List[int]
bosco/generate.py:20: error: List comprehension has incompatible type List[str]; expected List[int]
bosco/generate.py:27: error: Incompatible return value type (got "List[int]", expected "List[Union[int, float, str]]")
bosco/generate.py:27: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
bosco/generate.py:27: note: Consider using "Sequence" instead, which is covariant
bosco/generate.py:27: note: Perhaps you need a type annotation for "random_list"? Suggestion: "List[Union[int, float, str]]"
bosco/list_processing/basics.py:105: error: Function "builtins.callable" is not valid as a type
bosco/list_processing/basics.py:105: note: Perhaps you need "Callable[...]" or a callback protocol?
bosco/list_processing/basics.py:107: error: callable? not callable
bosco/list_processing/basics.py:110: error: Function "builtins.callable" is not valid as a type
bosco/list_processing/basics.py:110: note: Perhaps you need "Callable[...]" or a callback protocol?
bosco/list_processing/basics.py:112: error: callable? not callable
bosco/list_processing/basics.py:115: error: Function "builtins.callable" is not valid as a type
bosco/list_processing/basics.py:115: note: Perhaps you need "Callable[...]" or a callback protocol?
bosco/list_processing/basics.py:119: error: callable? not callable
bosco/main.py:40: error: Argument 3 to "run_sorting_algorithm" has incompatible type "List[Union[int, float, str]]"; expected "List[int]"

Steps to Reproduce

These errors were encounted when running poetry run task lint.

Proposed Solution

Go through each file and resolve each linting error individually.

@simojo simojo added the help wanted Extra attention is needed label Apr 29, 2024
@AlishChhetri AlishChhetri self-assigned this Apr 29, 2024
@AlishChhetri AlishChhetri linked a pull request Apr 29, 2024 that will close this issue
3 tasks
@AlishChhetri
Copy link
Collaborator

AlishChhetri commented Apr 29, 2024

PR #33 address this issue in the generate.py, main.py, and benchmark.py files. I have not addressed the list_processing files as I do not want to negatively impact the work of another team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants