numcodecs icon indicating copy to clipboard operation
numcodecs copied to clipboard

Apply refurb suggestions

Open DimitriPapadopoulos opened this issue 3 years ago • 0 comments

  • [FURB107] Replace try: ... except ImportError: pass with with suppress(ImportError): ...
  • [FURB109] Replace in [x, y, z] with in (x, y, z)
  • [FURB113] Use x.extend(...) instead of repeatedly calling x.append()
  • [FURB123] Replace list(x) with x.copy()

Not fixing all of them: some are debatable and other result in less readable (by me) code.

https://github.com/dosisod/refurb

TODO:

  • [ ] Unit tests and/or doctests in docstrings
  • [ ] tox -e py310 passes locally
  • [ ] Docstrings and API docs for any new/modified user-facing classes and functions
  • [x] Changes documented in docs/release.rst
  • [ ] tox -e docs passes locally
  • [x] GitHub Actions CI passes
  • [x] Test coverage to 100% (Coveralls passes)

DimitriPapadopoulos avatar Oct 28 '22 16:10 DimitriPapadopoulos