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

Implement consistent code style and code formatting for py files #1

Open
IE-smhi opened this issue Mar 15, 2024 · 0 comments
Open

Implement consistent code style and code formatting for py files #1

IE-smhi opened this issue Mar 15, 2024 · 0 comments
Assignees

Comments

@IE-smhi
Copy link

IE-smhi commented Mar 15, 2024

Used ruff https://docs.astral.sh/ruff/ a linter with formatting options
Used isort https://pycqa.github.io/isort/ https://pycqa.github.io/isort/docs/configuration/custom_sections_and_ordering.html
isort only used for the grunt work rest is done manually.

[tool.isort]
multi_line_output = 3
include_trailing_comma = false
line_length = 120
#known_third_party = ["", "psycopg2", "numpy", "pygrib", "pyinotify"]
#known_first_party = ["baltrad", "_rave*" , "_*"]
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]

src_paths = ["src"]


[tool.ruff]
exclude = [
  "build/",
  "c-examples/",
  "config/",
  "doc/",
  "doxygen/",
  "librave/",
  "modules/",
  "packaging/",
  "templates/",
  "*.c",
  "*.h",
]
line-length = 120
indent-width = 4

#target-version = ["py36", "py37", "py38", "py39"]
target-version = "py37"

[tool.ruff.format]
quote-style = "preserve"
indent-style = "space"
skip-magic-trailing-comma = false
docstring-code-format = false
docstring-code-line-length = "dynamic"

@IE-smhi IE-smhi self-assigned this Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant