Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d4f6bd7

Browse files
authoredApr 22, 2024
Merge branch 'master' into enable-ruff-RUF002-rule
2 parents b680a41 + 79dc7c9 commit d4f6bd7

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed
 

‎.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ repos:
1616
- id: auto-walrus
1717

1818
- repo: https://github.com/astral-sh/ruff-pre-commit
19-
rev: v0.3.7
19+
rev: v0.4.1
2020
hooks:
2121
- id: ruff
2222
- id: ruff-format
@@ -29,7 +29,7 @@ repos:
2929
- tomli
3030

3131
- repo: https://github.com/tox-dev/pyproject-fmt
32-
rev: "1.7.0"
32+
rev: "1.8.0"
3333
hooks:
3434
- id: pyproject-fmt
3535

‎computer_vision/cnn_classification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
# Importing the Keras libraries and packages
2727
import tensorflow as tf
28-
from tensorflow.keras import layers, models
28+
from keras import layers, models
2929

3030
if __name__ == "__main__":
3131
# Initialising the CNN

‎machine_learning/lstm/lstm_prediction.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
import numpy as np
99
import pandas as pd
10+
from keras.layers import LSTM, Dense
11+
from keras.models import Sequential
1012
from sklearn.preprocessing import MinMaxScaler
11-
from tensorflow.keras.layers import LSTM, Dense
12-
from tensorflow.keras.models import Sequential
1313

1414
if __name__ == "__main__":
1515
"""

‎physics/basic_orbital_capture.py

Lines changed: 3 additions & 3 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ lint.ignore = [ # `ruff rule S101` for a description of that rule
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
1313
"RUF001", # String contains ambiguous {}. Did you mean {}?
14+
"RUF002", # Docstring contains ambiguous {}. Did you mean {}?
1415
"RUF003", # Comment contains ambiguous {}. Did you mean {}?
1516
"S101", # Use of `assert` detected -- DO NOT FIX
1617
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes -- FIX ME

0 commit comments

Comments
 (0)
Please sign in to comment.