Skip to content

Commit 239afd3

Browse files
committed
Enable ruff RUF001 rule
1 parent 2702bf9 commit 239afd3

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

fuzzy_logic/fuzzy_operations.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def union(self, other) -> FuzzySet:
150150
FuzzySet(name='a ∪ b', left_boundary=0.1, peak=0.6, right_boundary=0.35)
151151
"""
152152
return FuzzySet(
153-
f"{self.name} {other.name}",
153+
f"{self.name} U {other.name}",
154154
min(self.left_boundary, other.left_boundary),
155155
max(self.right_boundary, other.right_boundary),
156156
(self.peak + other.peak) / 2,

physics/basic_orbital_capture.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
"""
66
These two functions will return the radii of impact for a target object
7-
of mass M and radius R as well as it's effective cross sectional area σ(sigma).
8-
That is to say any projectile with velocity v passing within σ, will impact the
7+
of mass M and radius R as well as it's effective cross sectional area sigma.
8+
That is to say any projectile with velocity v passing within sigma, will impact the
99
target object with mass M. The derivation of which is given at the bottom
1010
of this file.
1111
1212
The derivation shows that a projectile does not need to aim directly at the target
1313
body in order to hit it, as R_capture>R_target. Astronomers refer to the effective
14-
cross section for capture as σ=π*R_capture**2.
14+
cross section for capture as sigma=π*R_capture**2.
1515
1616
This algorithm does not account for an N-body problem.
1717

physics/malus_law.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
Real polarizers are also not perfect blockers of the polarization orthogonal to
3232
their polarization axis; the ratio of the transmission of the unwanted component
3333
to the wanted component is called the extinction ratio, and varies from around
34-
1:500 for Polaroid to about 1:106 for GlanTaylor prism polarizers.
34+
1:500 for Polaroid to about 1:106 for Glan-Taylor prism polarizers.
3535
3636
Reference : "https://en.wikipedia.org/wiki/Polarizer#Malus's_law_and_other_properties"
3737
"""

pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ lint.ignore = [ # `ruff rule S101` for a description of that rule
1010
"PLW2901", # PLW2901: Redefined loop variable -- FIX ME
1111
"PT011", # `pytest.raises(Exception)` is too broad, set the `match` parameter or use a more specific exception
1212
"PT018", # Assertion should be broken down into multiple parts
13-
"RUF001", # String contains ambiguous {}. Did you mean {}?
1413
"RUF002", # Docstring contains ambiguous {}. Did you mean {}?
1514
"RUF003", # Comment contains ambiguous {}. Did you mean {}?
1615
"S101", # Use of `assert` detected -- DO NOT FIX

0 commit comments

Comments
 (0)