Skip to content

Commit

Permalink
update pyproject.toml and scripts/glos-find-bar-words.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Mar 23, 2024
1 parent b7349f8 commit d6002ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 32 deletions.
30 changes: 2 additions & 28 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,38 +109,12 @@ lint.ignore = [
"UP009", # UTF-8 encoding declaration is unnecessary
"UP037", # Remove quotes from type annotation
"W191", # Indentation contains tabs
"SIM110", # Use any(...)
"SIM115", # Use context handler for opening files
# "SIM111", # Use all(...): warning: `SIM111` has been remapped to `SIM110`.
"TCH003", # Move standard library import `...` into a type-checking block
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in ...
"TCH003", # Move standard library import `...` into a type-checking block
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in ...
]

# UP033: (Since Python 3.9) Use `@functools.cache`
# instead of `@functools.lru_cache(maxsize=None)`

# since which Python is comma after **kwargs allowd?

# Allow autofix for all enabled rules (when `--fix`) is provided.
# lint.fixable = [
# "ANN",
# "C408", # Unnecessary `dict` call (rewrite as a literal)
# "COM",
# "D",
# "E",
# "F",
# "W",
# "F401",
# "I",
# "Q",
# "PIE790",
# "RET",
# "RUF",
# # "SIM",
# "SIM108", # Use ternary operator {contents} instead of if-else-block
# "TCH",
# "UP",
# ]
lint.unfixable = []

# Exclude a variety of commonly ignored directories.
Expand Down
5 changes: 1 addition & 4 deletions scripts/glos-find-bar-words.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@


def hasBar(entry):
for word in entry.l_word:
if "|" in word:
return True
return False
return any("|" in word for word in entry.l_word)


Glossary.init(
Expand Down

0 comments on commit d6002ab

Please sign in to comment.