Skip to content

Commit

Permalink
Extend from skare3/template versions
Browse files Browse the repository at this point in the history
  • Loading branch information
taldcroft committed Feb 25, 2024
1 parent 288f929 commit 781b950
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 17 deletions.
15 changes: 4 additions & 11 deletions ruff-base.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copied originally from pandas
# Copied originally from pandas. This config requires ruff >= 0.2.
target-version = "py310"

# fix = true
Expand Down Expand Up @@ -27,29 +27,22 @@ lint.select = [
lint.extend-select = [
"UP009", # UTF-8 encoding declaration is unnecessary
"SIM118", # Use `key in dict` instead of `key in dict.keys()`
# "D205", # One blank line required between summary line and description
"D205", # One blank line required between summary line and description
"ARG001", # Unused function argument
"RSE102", # Unnecessary parentheses on raised exception
"PERF401", # Use a list comprehension to create a transformed list
]

lint.ignore = [
"ISC001", # Disable this for compatibility with ruff format
"B028", # No explicit `stacklevel` keyword argument found
"B905", # `zip()` without an explicit `strict=` parameter
"E402", # module level import not at top of file
"E731", # do not assign a lambda expression, use a def
"PLC1901", # compare-to-empty-string
"PLR0911", # Too many returns
"PLR0912", # Too many branches
"PLR0913", # Too many arguments to function call
"PLR0915", # Too many statements
"PLR2004", # Magic number
"B028", # No explicit `stacklevel` keyword argument found
]

extend-exclude = [
"docs",
"roll_play.py",
]

[lint.pycodestyle]
Expand All @@ -61,4 +54,4 @@ max-line-length = 100 # E501 reports lines that exceed the length of 100.
# - D205: Don't worry about test docstrings
# - ARG001: Unused function argument false positives for some fixtures
# - E501: Line-too-long
"**/tests/test_*.py" = ["D205", "ARG001", "E501"]
"**/tests/test_*.py" = ["D205", "ARG001", "E501"]
30 changes: 24 additions & 6 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,31 @@ extend = "ruff-base.toml"

extend-exclude = [
"**/*.ipynb",
"obs*.py",
"go.py",
"go[0-9].py",
"junk/",
"roll_play.py",
]

# Some additional rules that are useful
lint.extend-select = [
"D205", # One blank line required between summary line and description
]
# These are rules that commonly cause many ruff warnings. Code will be improved by
# incrementally fixing code to adhere to these rules, but for practical purposes they
# can be ignored by uncommenting each one. You can also add to this list as needed.
lint.extend-ignore = [
"B905", # `zip()` without an explicit `strict=` parameter
"PLR0912", # Too many branches
"PLR0913", # Too many arguments to function call
"PLR0915", # Too many statements
# "PLC1901", # compare-to-empty-string
# "PLR0911", # Too many returns
# "PGH004", # Use specific rule codes when using `noqa`
# "C401", # Unnecessary generator (rewrite as a `set` comprehension)
# "C402", # Unnecessary generator (rewrite as a dict comprehension)
# "C405", # Unnecessary `list` literal (rewrite as a `set` literal)
# "C408", # Unnecessary `dict` call (rewrite as a literal)
# "C416", # Unnecessary `dict` comprehension (rewrite using `dict()`)
# "G010", # warn is deprecated in favor of warning
# "PYI056", # Calling `.append()` on `__all__` may not be supported by all type checkers
]

[lint.extend-per-file-ignores]
# B905 [*] `zip()` without an explicit `strict=` parameter
"**/tests/test_*.py" = ["B905"]

0 comments on commit 781b950

Please sign in to comment.