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

STY: activate flake8-comprehensions (ruff) #196

Merged
merged 3 commits into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

[![yt-project](https://img.shields.io/static/v1?label="works%20with"&message="yt"&color="blueviolet")](https://yt-project.org)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/charliermarsh/ruff)

This is yt_astro_analysis, the [yt](https://github.com/yt-project/yt) extension
package for astrophysical analysis. This package contains
Expand Down
6 changes: 5 additions & 1 deletion doc/extensions/config_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ def setup(app):
setup.config = app.config
setup.confdir = app.confdir

retdict = dict(version="1.0", parallel_read_safe=True, parallel_write_safe=True)
retdict = {
"version": "1.0",
"parallel_read_safe": True,
"parallel_write_safe": True,
}

return retdict

Expand Down
6 changes: 5 additions & 1 deletion doc/extensions/pythonscript_sphinxext.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ def setup(app):
setup.config = app.config
setup.confdir = app.confdir

retdict = dict(version="0.1", parallel_read_safe=True, parallel_write_safe=True)
retdict = {
"version": "0.1",
"parallel_read_safe": True,
"parallel_write_safe": True,
}

return retdict

Expand Down
6 changes: 5 additions & 1 deletion doc/extensions/yt_colormaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ def setup(app):
setup.config = app.config
setup.confdir = app.confdir

retdict = dict(version="0.1", parallel_read_safe=True, parallel_write_safe=True)
retdict = {
"version": "0.1",
"parallel_read_safe": True,
"parallel_write_safe": True,
}

return retdict

Expand Down
6 changes: 5 additions & 1 deletion doc/extensions/yt_cookbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ def setup(app):
setup.config = app.config
setup.confdir = app.confdir

retdict = dict(version="0.1", parallel_read_safe=True, parallel_write_safe=True)
retdict = {
"version": "0.1",
"parallel_read_safe": True,
"parallel_write_safe": True,
}

return retdict

Expand Down
14 changes: 7 additions & 7 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,15 @@
# documentation.
#
# html_theme_options = {}
html_theme_options = dict(
bootstrap_version="3",
bootswatch_theme="readable",
navbar_links=[
html_theme_options = {
"bootstrap_version": "3",
"bootswatch_theme": "readable",
"navbar_links": [
# (<title>, <link>)
],
navbar_sidebarrel=False,
globaltoc_depth=2,
)
"navbar_sidebarrel": False,
"globaltoc_depth": 2,
}

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
Expand Down
11 changes: 6 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,12 @@ select = [
"E",
"F",
"W",
"B",
"G",
"YTT",
"I",
"UP",
"C4", # flake8-comprehensions
"B", # flake8-bugbear
"G", # flake8-logging
"YTT", # flake8-2020
"I", # isort
"UP", # pyupgrade
]

[tool.ruff.isort]
Expand Down