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

a few minor code changes #259

Merged
merged 1 commit into from
Aug 21, 2024
Merged

Conversation

fchapoton
Copy link
Contributor

@fchapoton fchapoton commented Aug 1, 2024

🇫🇷

juste quelques petits details

plus suppression des lignes de declaration d'encodage utf8, inutiles

🇬🇧

The utf-8 encoding is now the default in python since python3, so there is no need to declare that in every file.

Using yield from is recommended as much better by pep 0380 (https://peps.python.org/pep-0380/).

IOError is now an alias for OSError.

Some of the changes were scripted using the very fast linter ruff, see the section UP in its documentation : https://docs.astral.sh/ruff/rules/#pyupgrade-up and in particular UP009 and UP024.

@JeanMainguy JeanMainguy changed the base branch from master to dev August 2, 2024 12:24
@jpjarnoux
Copy link
Member

Hi!

Thanks for your contribution.

Could you please update your description with more details and translate it into English?
What I meant by more details is:

  • Why suppress utf-8 encoding
  • You changed IOError into OSError; could you say why?
  • Any other information or references that seem important to understand what you did

We found some information that justifies your change, but it would be better if it came from you.

Thanks again, and regards

@JeanMainguy
Copy link
Member

Thank you for the update of the description 👌

@JeanMainguy JeanMainguy merged commit 042c866 into labgem:dev Aug 21, 2024
4 checks passed
@fchapoton fchapoton deleted the code_simplification branch August 21, 2024 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants