Reid Priedhorsky

Results 151 comments of Reid Priedhorsky

### Bad `%` (E1305 too-many-format-args) - [ ] done https://github.com/hpc/charliecloud/blob/5ceefa7040c0accb91acf8b2c99e0f7ec6a97429/lib/filesystem.py#L763 Yep, that's wrong.

### Merge `isinstance()` (R1701 consider-merging-isintance) - [ ] done https://github.com/hpc/charliecloud/blob/d67937332094a7d8de8e9bd2e112d30d117c50c0/lib/build.py#L77-L79 Should probably fix.

### FP complaints about `return` on `ch.FATAL` (R1710 inconsistent-return-statements) - [ ] done https://github.com/hpc/charliecloud/blob/d67937332094a7d8de8e9bd2e112d30d117c50c0/lib/charliecloud.py#L648-L653 This is a FP because `ch.FATAL` doesn’t return (it goes into an exception procedure that kills...

### Useless return complaints (R1711 useless-return) - [ ] done https://github.com/hpc/charliecloud/blob/d67937332094a7d8de8e9bd2e112d30d117c50c0/lib/build_cache.py#L1387-L1389 The `return` is indeed useless but in this particular case I like it there because related classes’ `commit()` does...

### Built-in `exit()` re-defined (R1722 consider-using-sys-exit, W0622 redefined-builtin) - [ ] done https://github.com/hpc/charliecloud/blob/d67937332094a7d8de8e9bd2e112d30d117c50c0/lib/charliecloud.py#L638-L639 https://github.com/hpc/charliecloud/blob/d67937332094a7d8de8e9bd2e112d30d117c50c0/lib/charliecloud.py#L661-L664 This is the same problem. Rename our `exit()`, and see if we are calling `sys.exit()` anywhere...

### Use error-checking `ch.open_()` (R1732 consider-using-with) - [ ] done https://github.com/hpc/charliecloud/blob/d67937332094a7d8de8e9bd2e112d30d117c50c0/lib/build_cache.py#L1108 `with` isn’t a good match for Charliecloud because the key operations are wrapped so they can’t fail. That is,...

### Bad keyword argument defaults (W0102 dangerous-default-value) - [ ] done https://github.com/hpc/charliecloud/blob/d67937332094a7d8de8e9bd2e112d30d117c50c0/lib/charliecloud.py#L528-L529 I agree. Fix.

### Needless `pass` (W0107 unnecessary pass) - [ ] done https://github.com/hpc/charliecloud/blob/d67937332094a7d8de8e9bd2e112d30d117c50c0/lib/build.py#L449-L452 IMO clearer this way. Ignore globally.

### FP on `self.__class__` (W0212 protected-access) - [ ] done https://github.com/hpc/charliecloud/blob/5ceefa7040c0accb91acf8b2c99e0f7ec6a97429/lib/filesystem.py#L814 Technically this a false positive — we’re accessing a private class (not instance) member — but going though `self.__class__`...

### Superclass `__init__()` not called (W0231 super-init-not-called) - [ ] done https://github.com/hpc/charliecloud/blob/d67937332094a7d8de8e9bd2e112d30d117c50c0/lib/build_cache.py#L1374-L1377 This is on purpose b/c the inheritance is a bit strange. I’d like to leave it enabled and...