Skip to content

Commit

Permalink
update ruff linter settings (#1950)
Browse files Browse the repository at this point in the history
* update linter settings

* Update `pyproject.toml`

* exclude notebooks from ruff linter

* Fix ruff formatting in plot_linking_data

---------

Co-authored-by: Ryan Ly <[email protected]>
Co-authored-by: Oliver Ruebel <[email protected]>
  • Loading branch information
3 people authored Aug 20, 2024
1 parent 12598ea commit 2d00afe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/gallery/advanced_io/plot_linking_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@
# -------------------------------------------------------------------
#
# For extremely large datasets it can be useful to split data across multiple files, e.g., in cases where
# the file stystem does not allow for large files. While we can
# achieve this by writing different components (e.g., :py:meth:`~pynwb.base.TimeSeries`) to different files as described above,
# the file stystem does not allow for large files. While we can achieve this by writing different
# components (e.g., :py:meth:`~pynwb.base.TimeSeries`) to different files as described above,
# this option does not allow splitting data from single datasets. An alternative option is to use the
# ``family`` driver in ``h5py`` to automatically split the NWB file into a collection of many HDF5 files.
# The ``family`` driver stores the file on disk as a series of fixed-length chunks (each in its own file).
Expand Down
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ omit = [
]

[tool.ruff]
select = ["E", "F", "T100", "T201", "T203"]
lint.select = ["E", "F", "T100", "T201", "T203"]
exclude = [
".git",
".tox",
Expand All @@ -100,12 +100,13 @@ exclude = [
"dist/",
"src/nwb-schema",
"docs/source/conf.py",
"docs/notebooks/*",
"src/pynwb/_due.py",
"test.py" # remove when pytest comes along
]
line-length = 120

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"tests/read_dandi/*" = ["T201"]
"docs/gallery/*" = ["E402", "T201"]
"src/*/__init__.py" = ["F401"]
Expand All @@ -115,6 +116,6 @@ line-length = 120

# "test_gallery.py" = ["T201"] # Uncomment when test_gallery.py is created

[tool.ruff.mccabe]
[tool.ruff.lint.mccabe]
max-complexity = 17

0 comments on commit 2d00afe

Please sign in to comment.