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

PyLint #164

Open
sprestrelski opened this issue Nov 18, 2023 · 4 comments
Open

PyLint #164

sprestrelski opened this issue Nov 18, 2023 · 4 comments

Comments

@sprestrelski
Copy link
Member

Add linting, similar to the setup here: https://github.com/UCSD-E4E/acoustic-multiclass-training/blob/main/.github/workflows/pylint.yml

This should also include some restructuring to remove old/irrelevant functions

@natmfat
Copy link

natmfat commented Nov 21, 2023

Would this allow us to remove runtime type checking assertions?

@sprestrelski
Copy link
Member Author

Maybe? Linting should help typecheck any parameters that get passed in, but wouldn't necessarily help if we change the datatype in the function (ie. dictionary --> DataFrame).

@JacobGlennAyers
Copy link
Contributor

Why would we want to remove runtime type checking?

@natmfat
Copy link

natmfat commented Nov 21, 2023

For the same reason we don't check if something is a number in Java. Static type checkers remove the possibility of using a string instead of a number, as an example (so runtime guards don't make sense).

Admittedly it would be useful in cases where types don't cover (ie: this value should be greater than 0). We could also use pydantic to still have runtime guards without checking ourselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants