Skip to content

Conversation

jirimoravcik
Copy link
Member

I used https://pypi.org/project/flake8_simplify/ to get some insights and improved the code a bit

@jirimoravcik jirimoravcik added adhoc Ad-hoc unplanned task added during the sprint. debt Code quality improvement or decrease of technical debt. labels Aug 1, 2023
@jirimoravcik jirimoravcik requested review from fnesveda and vdusek August 1, 2023 11:15
@github-actions github-actions bot added this to the 69th sprint - Platform team milestone Aug 1, 2023
@github-actions github-actions bot added t-core-services Issues with this label are in the ownership of the core services team. tested Temporary label used only programatically for some analytics. labels Aug 1, 2023
Copy link
Contributor

@vdusek vdusek left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@fnesveda fnesveda left a comment

Choose a reason for hiding this comment

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

Cool!

Copy link
Contributor

@vdusek vdusek left a comment

Choose a reason for hiding this comment

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

What about adding the flake8_simplify package to the dev dependencies?

@jirimoravcik
Copy link
Member Author

What about adding the flake8_simplify package to the dev dependencies?

Yeah, I though about it. It reports some stuff that I didn't want to change :D (specifically, using context managers for files - we have code that does open(..).close() which is shorter than using a context manager. But I think it's fine

@jirimoravcik
Copy link
Member Author

Added flake8-simplify as dev dependency. Will also do for other 2 repos along with code simplification

@jirimoravcik jirimoravcik requested a review from vdusek August 1, 2023 11:52
Copy link
Contributor

@vdusek vdusek left a comment

Choose a reason for hiding this comment

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

Yeah, I though about it. It reports some stuff that I didn't want to change :D (specifically, using context managers for files - we have code that does open(..).close() which is shorter than using a context manager.

I'd use #noqa for such cases, up to you, both variants LGTM.

@jirimoravcik
Copy link
Member Author

Yeah, I though about it. It reports some stuff that I didn't want to change :D (specifically, using context managers for files - we have code that does open(..).close() which is shorter than using a context manager.

I'd use #noqa for such cases, up to you, both variants LGTM.

I just did the suggested change, it's better than noqa or adding the rule to flake ignores

@jirimoravcik jirimoravcik merged commit 7f8ee73 into master Aug 1, 2023
@jirimoravcik jirimoravcik deleted the chore/code-quality-improvements branch August 1, 2023 12:12
@fnesveda fnesveda added the validated Issues that are resolved and their solutions fulfill the acceptance criteria. label Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adhoc Ad-hoc unplanned task added during the sprint. debt Code quality improvement or decrease of technical debt. t-core-services Issues with this label are in the ownership of the core services team. tested Temporary label used only programatically for some analytics. validated Issues that are resolved and their solutions fulfill the acceptance criteria.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants