Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply ruff/flake8-simplify rules (SIM) #9727

Merged
merged 4 commits into from
Nov 6, 2024
Merged

Conversation

DimitriPapadopoulos
Copy link
Contributor

No description provided.

SIM101 Multiple `isinstance` calls for expression, merge into a single call
SIM110 Use `return any()` instead of `for` loop
SIM910 Use `.get(...)` instead of `.get(..., None)`
Copy link
Collaborator

@max-sixty max-sixty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@dcherian dcherian enabled auto-merge (squash) November 6, 2024 17:43
@dcherian dcherian merged commit fad2773 into pydata:main Nov 6, 2024
29 checks passed
dcherian added a commit to dcherian/xarray that referenced this pull request Nov 7, 2024
* main:
  Enforce ruff/flake8-pie rules (PIE) (pydata#9740)
  Enforce ruff/flake8-comprehensions rules (C4) (pydata#9724)
  Enforce ruff/Perflint rules (PERF)  (pydata#9730)
  Apply ruff rule RUF007 (pydata#9739)
  chmod -x (pydata#9725)
  Aplpy ruff rules (RUF) (pydata#9731)
  Fix typos found by codespell (pydata#9721)
  support for additional scipy nd interpolants  (pydata#9599)
  Apply ruff/flake8-simplify rules (SIM) (pydata#9727)
  Apply ruff/flake8-implicit-str-concat rules (ISC) (pydata#9722)
  Apply ruff/flake8-pie rules (PIE) (pydata#9726)
  Enforce ruff/pygrep-hooks rules (PGH) (pydata#9729)
  Move to micromamba 2 (pydata#9732)
  Fix groupby tests (pydata#9716)
  Add missing xarray.core.missing import (pydata#9714)
  Fix writing of DataTree subgroups to zarr or netCDF (pydata#9677)
  Bump pypa/gh-action-pypi-publish from 1.10.3 to 1.11.0 in the actions group (pydata#9707)
  Update pre-commit hooks (pydata#9713)
dcherian added a commit to scharlottej13/xarray that referenced this pull request Nov 9, 2024
* main: (125 commits)
  http:// → https:// (pydata#9748)
  Discard useless `!s` conversion in f-string (pydata#9752)
  Apply ruff/flake8-simplify rule SIM401 (pydata#9749)
  Use micromamba 1.5.10 where conda is needed (pydata#9737)
  pin array-api-strict<=2.1 (pydata#9751)
  Reorganise ruff rules (pydata#9738)
  use new conda-forge package pydap-server (pydata#9741)
  Enforce ruff/flake8-pie rules (PIE) (pydata#9740)
  Enforce ruff/flake8-comprehensions rules (C4) (pydata#9724)
  Enforce ruff/Perflint rules (PERF)  (pydata#9730)
  Apply ruff rule RUF007 (pydata#9739)
  chmod -x (pydata#9725)
  Aplpy ruff rules (RUF) (pydata#9731)
  Fix typos found by codespell (pydata#9721)
  support for additional scipy nd interpolants  (pydata#9599)
  Apply ruff/flake8-simplify rules (SIM) (pydata#9727)
  Apply ruff/flake8-implicit-str-concat rules (ISC) (pydata#9722)
  Apply ruff/flake8-pie rules (PIE) (pydata#9726)
  Enforce ruff/pygrep-hooks rules (PGH) (pydata#9729)
  Move to micromamba 2 (pydata#9732)
  ...
scott-huberty added a commit to scott-huberty/xarray that referenced this pull request Nov 20, 2024
Manually fixed a conflict in xarray/backends/common.py, specifically LOC touched/added  by pydata#9727 and pydata#9787

In one case I just needed to incorporate the xarray.core.types imports from pydata#9787
In the other case, a flake was fixed in one of the attempted imports that will utilize the attempt_import function in this PR. I just incorporated that flake fix from pydata#9727  into this PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants