Skip to content

Commit

Permalink
style: Fix math-constant (FURB152) (#4049)
Browse files Browse the repository at this point in the history
* style: Fix math-constant (FURB152)
Ruff rule: https://docs.astral.sh/ruff/rules/math-constant/

* style: Fix math-constant (FURB152) in lib/imagery/testsuite/test_imagery_sigsetfile.py

* style: Fix math-constant (FURB152)
Ruff rule: https://docs.astral.sh/ruff/rules/math-constant/

* Revert "style: Fix math-constant (FURB152) in lib/imagery/testsuite/test_imagery_sigsetfile.py"

* style: Ignore math-constant (FURB152) in lib/imagery/testsuite/test_imagery_sigsetfile.py
  • Loading branch information
echoix authored Jul 14, 2024
1 parent b565924 commit 1936cf0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions display/d.text/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ def text(in_text):
rotate(i * 10)
color(colors[i % len(colors)])
xy(
(80 + 10 * math.cos(i * 10 / 180 * 3.141593)),
(50 + 10 * 640 / 480 * math.sin(i * 10 / 180 * 3.141593)),
(80 + 10 * math.cos(i * 10 / 180 * math.pi)),
(50 + 10 * 640 / 480 * math.sin(i * 10 / 180 * math.pi)),
)
text(fonts[int(i % len(fonts))])

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ ignore = [
"FBT002", # boolean-default-value-positional-argument
"FBT003", # boolean-positional-value-in-call
"FURB118", # reimplemented-operator
"FURB152", # math-constant
"I001", # unsorted-imports
"ISC003", # explicit-string-concatenation
"PERF203", # try-except-in-loop
Expand Down Expand Up @@ -354,6 +353,7 @@ ignore = [
"gui/wxpython/web_services/widgets.py" = ["INT003"]
"gui/wxpython/wxgui.py" = ["INT002"]
"gui/wxpython/wxplot/profile.py" = ["NPY001"]
"lib/imagery/testsuite/test_imagery_sigsetfile.py" = ["FURB152"]
"lib/init/grass.py" = ["INT003"]
"python/grass/__init__.py" = ["PYI056"]
"python/grass/exp*/tests/grass_script_mapset_session_test.py" = ["SIM117"]
Expand Down

0 comments on commit 1936cf0

Please sign in to comment.