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

Add toml formatter #6227

Merged
merged 3 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,16 @@ repos:
types_or:
- markdown
- yaml
- repo: https://github.com/hoxbro/taplo-pre-commit
rev: v0.7.0
hooks:
- id: taplo
args:
[
--option,
align_comments=false,
--option,
column_width=100,
--option,
"indent_string= ",
]
80 changes: 38 additions & 42 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ authors = [
{ name = "Jean-Luc Stevens", email = "developers@holoviz.org" },
{ name = "Philipp Rudiger", email = "developers@holoviz.org" },
]
maintainers = [
{ name = "HoloViz developers", email = "developers@holoviz.org" },
]
maintainers = [{ name = "HoloViz developers", email = "developers@holoviz.org" }]
classifiers = [
"License :: OSI Approved :: BSD License",
"Development Status :: 5 - Production/Stable",
Expand Down Expand Up @@ -85,12 +83,12 @@ filterwarnings = [
# 2022-12: Warnings which should be fixed in Panel
"ignore:make_current is deprecated; start the event loop first:DeprecationWarning:panel.io.server",
# 2023-01: Numpy 1.24 warnings
"ignore:`.+?` is a deprecated alias for `.+?`.:DeprecationWarning:bokeh", # https://github.com/bokeh/bokeh/pull/12690
"ignore:`.+?` is a deprecated alias for `.+?`.:DeprecationWarning:cupy", # https://github.com/cupy/cupy/pull/7245
"ignore:`.+?` is a deprecated alias for `.+?`.:DeprecationWarning:plotly.express.imshow_utils", # https://github.com/plotly/plotly.py/pull/3997
"ignore:`.+?` is a deprecated alias for `.+?`.:DeprecationWarning:skimage.util.dtype", # https://github.com/scikit-image/scikit-image/pull/6637
"ignore:`.+?` is a deprecated alias for `.+?`.:DeprecationWarning:bokeh", # https://github.com/bokeh/bokeh/pull/12690
"ignore:`.+?` is a deprecated alias for `.+?`.:DeprecationWarning:cupy", # https://github.com/cupy/cupy/pull/7245
"ignore:`.+?` is a deprecated alias for `.+?`.:DeprecationWarning:plotly.express.imshow_utils", # https://github.com/plotly/plotly.py/pull/3997
"ignore:`.+?` is a deprecated alias for `.+?`.:DeprecationWarning:skimage.util.dtype", # https://github.com/scikit-image/scikit-image/pull/6637
# 2023-01: Sqlalchemy 2.0 warning:
"ignore: Deprecated API features detected:DeprecationWarning:ibis.backends.base.sql.alchemy", # https://github.com/ibis-project/ibis/issues/5048
"ignore: Deprecated API features detected:DeprecationWarning:ibis.backends.base.sql.alchemy", # https://github.com/ibis-project/ibis/issues/5048
# 2023-03: Already handling the nested sequence
"ignore:Creating an ndarray from ragged nested sequences:numpy.VisibleDeprecationWarning:holoviews.core.data.spatialpandas",
# 2023-09: Dash needs to update their code to use the comm module and pkg_resources
Expand All @@ -101,30 +99,26 @@ filterwarnings = [
# 2023-09: Not a relevant warning for HoloViews
"ignore:Jupyter is migrating its paths to use standard platformdirs:DeprecationWarning",
# 2023-09: `pkg_resources` is deprecated
"ignore:Deprecated call to `pkg_resources.+?'mpl_toolkits:DeprecationWarning", # https://github.com/matplotlib/matplotlib/issues/25244
"ignore:Deprecated call to `pkg_resources.+?'sphinxcontrib:DeprecationWarning", # https://github.com/mgaitan/sphinxcontrib-mermaid/issues/119
"ignore:Deprecated call to `pkg_resources.+?'mpl_toolkits:DeprecationWarning", # https://github.com/matplotlib/matplotlib/issues/25244
"ignore:Deprecated call to `pkg_resources.+?'sphinxcontrib:DeprecationWarning", # https://github.com/mgaitan/sphinxcontrib-mermaid/issues/119
"ignore: pkg_resources is deprecated as an API:DeprecationWarning:streamz.plugins", # https://github.com/python-streamz/streamz/issues/460
# 2023-10: Datetime's utctimestamp() and utcnow() is deprecated in Python 3.12
"ignore:datetime.datetime.utcfromtimestamp():DeprecationWarning:dateutil.tz.tz", # https://github.com/dateutil/dateutil/pull/1285
"ignore:datetime.datetime.utcfromtimestamp():DeprecationWarning:bokeh", # https://github.com/bokeh/bokeh/issues/13125
"ignore:datetime.datetime.utcnow():DeprecationWarning:bokeh", # https://github.com/bokeh/bokeh/issues/13125
"ignore:datetime.datetime.utcfromtimestamp():DeprecationWarning:dateutil.tz.tz", # https://github.com/dateutil/dateutil/pull/1285
"ignore:datetime.datetime.utcfromtimestamp():DeprecationWarning:bokeh", # https://github.com/bokeh/bokeh/issues/13125
"ignore:datetime.datetime.utcnow():DeprecationWarning:bokeh", # https://github.com/bokeh/bokeh/issues/13125
# 2024-01: Pandas 2.2
"ignore:When grouping with a length-1 list::dask.dataframe.groupby", # https://github.com/dask/dask/issues/10572
"ignore:\\s*Pyarrow will become a required dependency of pandas:DeprecationWarning", # Will go away by itself in Pandas 3.0
"ignore:Passing a (SingleBlockManager|BlockManager) to (Series|GeoSeries|DataFrame|GeoDataFrame) is deprecated:DeprecationWarning", # https://github.com/holoviz/spatialpandas/issues/137
"ignore:When grouping with a length-1 list::dask.dataframe.groupby", # https://github.com/dask/dask/issues/10572
"ignore:\\s*Pyarrow will become a required dependency of pandas:DeprecationWarning", # Will go away by itself in Pandas 3.0
"ignore:Passing a (SingleBlockManager|BlockManager) to (Series|GeoSeries|DataFrame|GeoDataFrame) is deprecated:DeprecationWarning", # https://github.com/holoviz/spatialpandas/issues/137
# 2024-02
"ignore:The current Dask DataFrame implementation is deprecated:DeprecationWarning", # https://github.com/dask/dask/issues/10917
"ignore:The current Dask DataFrame implementation is deprecated:DeprecationWarning", # https://github.com/dask/dask/issues/10917
# 2024-04
"ignore:No data was collected:coverage.exceptions.CoverageWarning", # https://github.com/pytest-dev/pytest-cov/issues/627
"ignore:No data was collected:coverage.exceptions.CoverageWarning", # https://github.com/pytest-dev/pytest-cov/issues/627
]

[tool.coverage]
omit = ["holoviews/__version.py"]
exclude_also = [
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"if ._pyodide. in sys.modules:",
]
exclude_also = ["if __name__ == .__main__.:", "if TYPE_CHECKING:", "if ._pyodide. in sys.modules:"]

[tool.ruff]
fix = true
Expand All @@ -149,32 +143,34 @@ select = [
]

ignore = [
"E402", # Module level import not at top of file
"E501", # Line too long
"E701", # Multiple statements on one line
"E712", # Comparison to true should be is
"E731", # Do not assign a lambda expression, use a def
"E741", # Ambiguous variable name
"F405", # From star imports
"PLE0604", # Invalid object in `__all__`, must contain only strings
"PLE0605", # Invalid format for `__all__`
"PLR091", # Too many arguments/branches/statements
"PLR2004", # Magic value used in comparison
"PLW2901", # `for` loop variable is overwritten
"RUF005", # Consider {expr} instead of concatenation
"RUF012", # Mutable class attributes should use `typing.ClassVar`
"E402", # Module level import not at top of file
"E501", # Line too long
"E701", # Multiple statements on one line
"E712", # Comparison to true should be is
"E731", # Do not assign a lambda expression, use a def
"E741", # Ambiguous variable name
"F405", # From star imports
"PLE0604", # Invalid object in `__all__`, must contain only strings
"PLE0605", # Invalid format for `__all__`
"PLR091", # Too many arguments/branches/statements
"PLR2004", # Magic value used in comparison
"PLW2901", # `for` loop variable is overwritten
"RUF005", # Consider {expr} instead of concatenation
"RUF012", # Mutable class attributes should use `typing.ClassVar`
]
unfixable = [
"F401", # Unused imports
"F841", # Unused variables
"F401", # Unused imports
"F841", # Unused variables
]

[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F403"]
"holoviews/tests/*" = [
"RUF001", "RUF002", "RUF003", # Ambiguous unicode character
"NPY002", # Replace legacy `np.random.rand` call with Generator
"B904", # Within an `except` clause, raise exceptions with from err or None
"RUF001", # Ambiguous unicode character,
hoxbro marked this conversation as resolved.
Show resolved Hide resolved
"RUF002", # Ambiguous unicode character
"RUF003", # Ambiguous unicode character
"NPY002", # Replace legacy `np.random.rand` call with Generator
"B904", # Within an `except` clause, raise exceptions with from err or None
]

[tool.ruff.lint.isort]
Expand Down
Loading