diff --git a/.basedpyright/baseline.json b/.basedpyright/baseline.json index 91086ad..d23817c 100644 --- a/.basedpyright/baseline.json +++ b/.basedpyright/baseline.json @@ -1338,8 +1338,24 @@ { "code": "reportAny", "range": { - "startColumn": 16, - "endColumn": 23, + "startColumn": 12, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportAny", + "range": { + "startColumn": 26, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportAny", + "range": { + "startColumn": 35, + "endColumn": 50, "lineCount": 1 } }, @@ -4659,22 +4675,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 11, - "endColumn": 38, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 11, - "endColumn": 40, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { diff --git a/contrib/weights-from-txt.py b/contrib/weights-from-txt.py index daf1297..e416073 100755 --- a/contrib/weights-from-txt.py +++ b/contrib/weights-from-txt.py @@ -5,7 +5,7 @@ with open(sys.argv[1]) as inf: - lines = [ln.strip() for ln in inf.readlines() if ln.strip()] + lines = [line for ln in inf if (line := ln.strip())] rule_name = sys.argv[2] diff --git a/modepy/modal_decay.py b/modepy/modal_decay.py index 5e9785a..e71854a 100644 --- a/modepy/modal_decay.py +++ b/modepy/modal_decay.py @@ -152,9 +152,7 @@ def skyline_pessimize(modal_values: ArrayF) -> ArrayF: cur_val = max(my_modes[-1], my_modes[-2]) for imode in range(nmodes-1, -1, -1): - if my_modes[imode] > cur_val: - cur_val = my_modes[imode] - + cur_val = max(cur_val, my_modes[imode]) result[iel, imode] = cur_val return result diff --git a/modepy/tools.py b/modepy/tools.py index 15fae8b..357a24f 100644 --- a/modepy/tools.py +++ b/modepy/tools.py @@ -292,7 +292,7 @@ def plot_element_values( pt.plot(orig_nodes[0], orig_values, "x") elif dims == 2: import matplotlib.pyplot as pt - import matplotlib.tri as tri + from matplotlib import tri triangulation = tri.Triangulation(nodes[0], nodes[1], triangles=submesh) ax = pt.subplot(1, 1, 1, projection="3d") diff --git a/pyproject.toml b/pyproject.toml index 367484f..01e15fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,7 +67,7 @@ exclude = [ preview = true [tool.ruff.lint] -extend-select = [ +select = [ "B", # flake8-bugbear "C", # flake8-comprehensions "E", # pycodestyle