Enable Ruff preview flag
This commit is contained in:
@@ -605,7 +605,7 @@ class Index:
|
|||||||
"""Get all headings for a specific item."""
|
"""Get all headings for a specific item."""
|
||||||
if tItem := self._itemIndex[tHandle]:
|
if tItem := self._itemIndex[tHandle]:
|
||||||
yield from tItem.items()
|
yield from tItem.items()
|
||||||
return []
|
return
|
||||||
|
|
||||||
def novelStructure(
|
def novelStructure(
|
||||||
self, rootHandle: str | None = None, activeOnly: bool = True
|
self, rootHandle: str | None = None, activeOnly: bool = True
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ class GuiTextDocument(QTextDocument):
|
|||||||
if count < maxCount and block.isValid() and block.userState() & cType > 0:
|
if count < maxCount and block.isValid() and block.userState() & cType > 0:
|
||||||
count += 1
|
count += 1
|
||||||
yield block
|
yield block
|
||||||
return None
|
return
|
||||||
|
|
||||||
##
|
##
|
||||||
# Public Slots
|
# Public Slots
|
||||||
|
|||||||
+2
-6
@@ -59,6 +59,7 @@ forced_separate = ["tests.*"]
|
|||||||
line-length = 99
|
line-length = 99
|
||||||
|
|
||||||
[tool.ruff.lint]
|
[tool.ruff.lint]
|
||||||
|
preview = true
|
||||||
select = [
|
select = [
|
||||||
"A", # flake8-builtins (A)
|
"A", # flake8-builtins (A)
|
||||||
"B", # flake8-bugbear (B)
|
"B", # flake8-bugbear (B)
|
||||||
@@ -67,7 +68,6 @@ select = [
|
|||||||
"W", # pycodestyle (W)
|
"W", # pycodestyle (W)
|
||||||
"UP", # pyupgrade (UP)
|
"UP", # pyupgrade (UP)
|
||||||
"ANN", # flake8-annotations (ANN)
|
"ANN", # flake8-annotations (ANN)
|
||||||
"PLC", # Pylint Convention (PLC)
|
|
||||||
"PLE", # Pylint Error (PLE)
|
"PLE", # Pylint Error (PLE)
|
||||||
"FA", # flake8-future-annotations (FA)
|
"FA", # flake8-future-annotations (FA)
|
||||||
]
|
]
|
||||||
@@ -76,6 +76,7 @@ ignore = [
|
|||||||
"E226", # missing-whitespace-around-arithmetic-operator
|
"E226", # missing-whitespace-around-arithmetic-operator
|
||||||
"E228", # missing-whitespace-around-modulo-operator
|
"E228", # missing-whitespace-around-modulo-operator
|
||||||
"E241", # multiple-spaces-after-comma
|
"E241", # multiple-spaces-after-comma
|
||||||
|
"E272", # multiple-spaces-before-keyword
|
||||||
"ANN401", # any-type
|
"ANN401", # any-type
|
||||||
"UP015", # redundant-open-modes
|
"UP015", # redundant-open-modes
|
||||||
"UP030", # format-literals
|
"UP030", # format-literals
|
||||||
@@ -92,11 +93,6 @@ include = ["novelwriter"]
|
|||||||
exclude = ["**/__pycache__"]
|
exclude = ["**/__pycache__"]
|
||||||
|
|
||||||
reportIncompatibleMethodOverride = false
|
reportIncompatibleMethodOverride = false
|
||||||
reportGeneralTypeIssues = "information"
|
|
||||||
reportOptionalMemberAccess = "information"
|
|
||||||
reportOptionalOperand = "information"
|
|
||||||
reportOptionalSubscript = "information"
|
|
||||||
reportUnboundVariable = "error"
|
|
||||||
|
|
||||||
pythonVersion = "3.10"
|
pythonVersion = "3.10"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user