Cleanup: part 2#30
Closed
ngie-eign wants to merge 8 commits into
Closed
Conversation
Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
This ignores a lot more autogenerated paths which should not be checked in to :master. Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
RUF005 (`collection-literal-concatenation`) suggests that the `+` operator should not be used when concatenating collections as `+` is less efficient than using the `*` or `**` operators unpacking the relevant collections. Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
The latter pattern mangles the traceback stack and should not be used. Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
As noted in the sqlite3 module documentation, string interpolation using %s, f-strings, etc, is discouraged because of potential security risks. In this case, there isn't an exploitable path, but applying the best-practice is wise here in case the pattern is copied to other places by accident and it becomes a true exploit concern. Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
Add missing comma between command arguments so the 2 string literals aren't pasted together. Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
`IntEnum` and `StrEnum` provide certain facilities out of the box that the `Enum` class doesn't provide -- in particular, they can be treated like `int` and `str` in certain scenarios. Use `auto` while here to avoid hardcoding constants with `ANSIColour`. Finally, fix Enum definitions: trailing commas are not technically allowed when defining enums; python treats values with trailing commas like tuples instead of scalars. Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
e0e370e to
bcf4a33
Compare
This helps provides the building blocks for improving on this tool. - ruff provides consistent linting capabilities. - tox helps with running automated checks/tests. I started with the `bricoler.utils` module because it's the most self-contained piece of code that can be easily tested. Other pieces of the tool are much more tightly coupled, and thus more difficult to test in isolation. Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
+operator for efficiency reasons.Requires: #29