Uh oh!
There was an error while loading. Please reload this page.
Apply and enforce more ruff rules - #2053
Conversation
0f1d160 to
aff1ee5CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
jhamman
left a comment
There was a problem hiding this comment.
Everything here looks good @DimitriPapadopoulos.
cc'ing @dstansby for a final review and look at the open mypy question
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
aff1ee5 to
42657f3Compare81fee09 to
4429df6Comparejhamman
commented
Aug 22, 2024
@DimitriPapadopoulos - lots of merge conflicts here. Mind taking this one from the top? |
DimitriPapadopoulos
commented
Aug 23, 2024
It might be easier to restart from scratch. Let me have a look. |
a01f1b7 to
4e919e2CompareDimitriPapadopoulos
commented
Aug 23, 2024
OK, I have re-applied all rules from scratch, leaving |
f5524ee to
80618fbCompareDimitriPapadopoulos
commented
Sep 2, 2024
Rebased. |
254b32c to
d26f5d3CompareDimitriPapadopoulos
commented
Sep 24, 2024
Because
I ended up deciding this is a MyPy issue and ignoring |
12e8393 to
05768eaComparePERF102 When using only the keys of a dict use the `keys()` method
df4d7e9 to
01d8480CompareDimitriPapadopoulos
commented
Sep 24, 2024
@jhamman This merge request seems ready for a review. |
d90ed39 to
b5b002aComparePERF401 Use an async list comprehension to create a transformed list
Ignore lint rules conflicting with the ruff formatter
PGH003 Use specific rule codes when ignoring type issues
PGH004 Use specific rule codes when using `noqa`
C417 Unnecessary `map` usage (rewrite using a generator expression)
PYI032 Prefer `object` to `Any` for the second parameter to `__eq__`
PYI036 Returning Any from function
PYI041 Use `complex` instead of `float | complex` PYI041 Use `float` instead of `int | float`
PYI055 Multiple `type` members in a union. Combine them into one.
b5b002a to
eba9d47Comparejhamman
commented
Sep 24, 2024
Thanks @DimitriPapadopoulos! |
| chunks_accessed = [ | ||
| ".".join([str(ci) for ci in comb]) for comb in itertools.product(*chunks_per_dim) | ||
| ] |
There was a problem hiding this comment.
Maybe we can simplify this a bit further?
| chunks_accessed= [ | |
| ".".join([str(ci) forciincomb]) forcombinitertools.product(*chunks_per_dim) | |
| ] | |
| chunks_accessed= [ | |
| ".".join(map(str, comb)) forcombinitertools.product(*chunks_per_dim) | |
| ] |
Please see PR: #2229
* v3: (21 commits) Default zarr.open to open_group if shape is not provided (zarr-developers#2158) feat: metadata-only support for storage transformers metadata (zarr-developers#2180) fix(async): set default concurrency to 10 tasks (zarr-developers#2256) chore(deps): drop support for python 3.10 and numpy 1.24 (zarr-developers#2217) feature(store): add LoggingStore wrapper (zarr-developers#2231) Apply assorted ruff/flake8-simplify rules (SIM) (zarr-developers#2259) Add array storage helpers (zarr-developers#2065) Apply ruff/flake8-annotations rule ANN204 (zarr-developers#2258) No need to run DeepSource any more - we use ruff (zarr-developers#2261) Remove unnecessary lambda expression (zarr-developers#2260) Enforce ruff/flake8-comprehensions rules (C4) (zarr-developers#2239) Use `map(str, *)` in `test_accessed_chunks` (zarr-developers#2229) Replace Gitter with Zulip (zarr-developers#2254) Enforce ruff/flake8-pytest-style rules (PT) (zarr-developers#2236) Fix multiple identical imports (zarr-developers#2241) Enforce ruff/flake8-return rules (RET) (zarr-developers#2237) Enforce ruff/flynt rules (FLY) (zarr-developers#2240) Fix fill_value handling for complex dtypes (zarr-developers#2200) Update V2 codec pipeline to use concrete classes (zarr-developers#2244) Apply and enforce more ruff rules (zarr-developers#2053) ...
PERF401, but do not enforce for now - see Apply ruff/Perflint rule PERF401 pypa/setuptools#4449 (comment) and MAINT: start applying ruff/Perflint rules (PERF) numpy/numpy#26876 (comment) and make your own opinion 😄PT022. Do not enforce for now, I fear you won't like otherPTrules.EnforceTCHrules.PGHrules.C405andC417. Do not enforce for now, someC4rules seem too strict.PYIrules.Fix pre-commit warnings and errors as they occurCatch more precise exceptions thanExceptionTODO: