Skip to content

Commit

Permalink
Merge pull request #16 from ninerealmlabs/fix/ruff-add-numpy-migration
Browse files Browse the repository at this point in the history
feat: enable numpy 2.0 migration hints with ruff
  • Loading branch information
ahgraber authored Jun 6, 2024
2 parents 0d004ae + 3ae8486 commit 9aaebe7
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 52 deletions.
53 changes: 27 additions & 26 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ preview = false # do not use unstable rules/fixes

# file selection
extend-exclude = [
'.ci',
'.pytest_cache',
'docs',
'*.egg-info',
'.ipynb_checkpoints',
'.env',
'.envrc',
'.git',
'.nox',
'.tox',
".ci",
".pytest_cache",
"docs",
"*.egg-info",
".ipynb_checkpoints",
".env",
".envrc",
".git",
".nox",
".tox",
]
extend-include = ["*.ipynb"]

Expand Down Expand Up @@ -44,22 +44,23 @@ docstring-code-format = true
exclude = ["*.pyi"]

select = [
'A', # flake8 builtins
'B', # flake8 bugbear
'C4', # flake8 comprehensions
'C90', # mccabe
'D', # pydocstyle
'E', # pycodestyle
'F', # pyflakes
'I', # isort
'N', # pep8-naming
# 'PTH', # flake8-use-pathlib
'Q', # flake8-quotes
'S', # bandit
'SIM', # flake8-simplify
'TRY', # tryceratops
'W', # pycodestyle
# 'T20', # flake8 print
"A", # flake8 builtins
"B", # flake8 bugbear
"C4", # flake8 comprehensions
"C90", # mccabe
"D", # pydocstyle
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"NPY201", # numpy2.0 migration
# "PTH", # flake8-use-pathlib
"Q", # flake8-quotes
"S", # bandit
"SIM", # flake8-simplify
"TRY", # tryceratops
"W", # pycodestyle
# "T20", # flake8 print
]

ignore = [
Expand Down
53 changes: 27 additions & 26 deletions template/{% if ruff %}.ruff.toml{% endif %}.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ preview = false # do not use unstable rules/fixes

# file selection
extend-exclude = [
'.ci',
'.pytest_cache',
'docs',
'*.egg-info',
'.ipynb_checkpoints',
'.env',
'.envrc',
'.git',
'.nox',
'.tox',
".ci",
".pytest_cache",
"docs",
"*.egg-info",
".ipynb_checkpoints",
".env",
".envrc",
".git",
".nox",
".tox",
]
extend-include = ["*.ipynb"]

Expand Down Expand Up @@ -44,22 +44,23 @@ docstring-code-format = true
exclude = ["*.pyi"]

select = [
'A', # flake8 builtins
'B', # flake8 bugbear
'C4', # flake8 comprehensions
'C90', # mccabe
'D', # pydocstyle
'E', # pycodestyle
'F', # pyflakes
'I', # isort
'N', # pep8-naming
# 'PTH', # flake8-use-pathlib
'Q', # flake8-quotes
'S', # bandit
'SIM', # flake8-simplify
'TRY', # tryceratops
'W', # pycodestyle
# 'T20', # flake8 print
"A", # flake8 builtins
"B", # flake8 bugbear
"C4", # flake8 comprehensions
"C90", # mccabe
"D", # pydocstyle
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"NPY201", # numpy2.0 migration
# "PTH", # flake8-use-pathlib
"Q", # flake8-quotes
"S", # bandit
"SIM", # flake8-simplify
"TRY", # tryceratops
"W", # pycodestyle
# "T20", # flake8 print
]

ignore = [
Expand Down

0 comments on commit 9aaebe7

Please sign in to comment.