deephaven / deephaven-plugins

Deephaven Plugins
11 stars 14 forks source link

fix: remove Number type and replace with float/int #590

Closed AkshatJawne closed 3 months ago

AkshatJawne commented 3 months ago

Resolves #589

Changes Implemented:

mattrunyon commented 3 months ago

@jnumainville thoughts on banning this import via ruff?

ruff.toml I think would just need to be

[lint]
select = ["ANN001", "TID251"]

[lint.per-file-ignores]
"**/{test,matplotlib,json,plotly}/*" = ["ANN001"]

[lint.flake8-tidy-imports.banned-api]
"numbers".msg = "Import from numbers is likely an accident. `float` includes `int` and is likely the desired type."

Info on the rule: https://docs.astral.sh/ruff/rules/banned-api/

jnumainville commented 3 months ago

I think banning it is a good idea for now.

mattrunyon commented 3 months ago

@AkshatJawne Update the root ruff.toml with what I commented and then try adding back one of those imports locally. Look in the readme for instructions on setting up pre-commit (you don't have to run pre-commit install if you don't want it to run before every commit).

Then you can run pre-commit run --all-files to test

AkshatJawne commented 3 months ago

Modified the ruff.toml file, do not see the warning. @mattrunyon