Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove pre-Python 3.6 style code #1919

Closed
4 tasks done
Tracked by #1784
ewels opened this issue May 4, 2023 · 2 comments
Closed
4 tasks done
Tracked by #1784

Remove pre-Python 3.6 style code #1919

ewels opened this issue May 4, 2023 · 2 comments

Comments

@ewels
Copy link
Member

ewels commented May 4, 2023

The MultiQC code base has a bunch of stuff written for Python 2 that we no longer need. We should modernise this for a cleaner, more readable, better code strucutre.

Examples, but not limited to:

  • Using OrderedDicts everywhere when we don't need to
  • __future__ statements
  • encode and other pre-unicode hacks
  • Format strings (run flynt)
  • ...
@ewels ewels added the core: refactoring Code refactoring label Sep 23, 2023
@ewels ewels changed the title Refactor code to remove Python 2 style Remove Python 2 style code Sep 28, 2023
@ewels
Copy link
Member Author

ewels commented Dec 12, 2023

One crept in with a new module:

https://github.com/ewels/MultiQC/blob/9d00f14a317a3eb40c8edb5b4e92fde4bf11689e/multiqc/modules/truvari/truvari.py#L3

Not sure if we can have this in code_checks.py or something? Just so that the old style doesn't creep back in from PRs.

@ewels ewels added this to the MultiQC v1.19 milestone Dec 12, 2023
@vladsavelyev vladsavelyev changed the title Remove Python 2 style code Remove pre-Python 3.6 style code Dec 12, 2023
@vladsavelyev
Copy link
Member

I think those creeping back shouldn't happen often, and we can handle that manually when reviewing the old PRs. If it becomes a problem, I'd add a check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants