Skip to content

Commit ff70be9

Browse files
authored
Merge pull request #860 from wearepal/ruff-2023-02-17
Update ruff
2 parents b6189c8 + f981dfe commit ff70be9

File tree

5 files changed

+25
-23
lines changed

5 files changed

+25
-23
lines changed

.github/workflows/continuous_integration.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ jobs:
4040
pip install ruff
4141
- name: Lint with ruff
4242
run: |
43-
ruff ethicml
43+
ruff check --format=github ethicml
4444
- name: Lint with ruff
4545
run: |
46-
ruff tests
46+
ruff check --format=github tests
4747
4848
format_with_black:
4949

ethicml/data/csvs/make_adult_from_raw.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def run_generate_adult() -> None:
3636
all_data = pd.concat([train, test], axis=0)
3737

3838
for col in all_data.columns:
39-
if all_data[col].dtype == np.object: # type: ignore[attr-defined]
39+
if all_data[col].dtype == object: # type: ignore[attr-defined]
4040
all_data[col] = all_data[col].str.strip()
4141

4242
# Replace full stop in the label of the test set

ethicml/data/csvs/make_crime_from_raw.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def run_generate_crime() -> None:
160160
data.columns = pd.Index(columns)
161161

162162
for col in data.columns:
163-
if data[col].dtype == np.object: # type: ignore[attr-defined]
163+
if data[col].dtype == object: # type: ignore[attr-defined]
164164
data[col] = data[col].str.strip()
165165

166166
# Drop NaNs

poetry.lock

+19-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ python-type-stubs = {git = "https://github.com/wearepal/python-type-stubs.git",
5757
pandas-stubs = ">=1.4.2.220626"
5858
omegaconf = ">=2.2.1"
5959
pytest-xdist = "^2.5.0"
60-
ruff = "0.0.243"
60+
ruff = "0.0.247"
6161
pip = "^22.3.1"
6262

6363
[tool.poetry.group.ci]
@@ -206,6 +206,7 @@ select = [
206206
"F", # pyflakes
207207
"I", # isort
208208
"N", # pep8-naming
209+
"NPY", # numpy
209210
"PD", # pandas-vet
210211
"PLC", # pylint convention
211212
"PLE", # pylint error

0 commit comments

Comments
 (0)