Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: make code PEP597 compliant#2201

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nejch merged 1 commit intomainfromjlvillal/encoding_warning
Jul 29, 2022
Merged

Conversation

@JohnVillalovos
Copy link
Member

Useencoding="utf-8" inopen() and open-like functions.

https://peps.python.org/pep-0597/

Use `encoding="utf-8"` in `open()` and open-like functions.https://peps.python.org/pep-0597/
@codecov-commenter
Copy link

Codecov Report

Merging#2201 (433dba0) intomain (8ba97aa) willincrease coverage by4.00%.
The diff coverage is100.00%.

@@            Coverage Diff             @@##             main    #2201      +/-   ##==========================================+ Coverage   91.56%   95.56%   +4.00%==========================================  Files          81       81                Lines        5344     5344              ==========================================+ Hits         4893     5107     +214+ Misses        451      237     -214
FlagCoverage Δ
api_func_v481.41% <100.00%> (?)
cli_func_v483.06% <100.00%> (-0.10%)⬇️
unit87.31% <100.00%> (ø)

Flags with carried forward coverage won't be shown.Click here to find out more.

Impacted FilesCoverage Δ
gitlab/config.py100.00% <100.00%> (ø)
gitlab/utils.py98.59% <0.00%> (+1.40%)⬆️
gitlab/v4/objects/members.py94.82% <0.00%> (+1.72%)⬆️
gitlab/client.py98.70% <0.00%> (+3.44%)⬆️
gitlab/types.py98.21% <0.00%> (+3.57%)⬆️
gitlab/v4/objects/notes.py94.28% <0.00%> (+3.80%)⬆️
gitlab/v4/objects/groups.py89.40% <0.00%> (+3.97%)⬆️
gitlab/v4/objects/pages.py100.00% <0.00%> (+5.00%)⬆️
gitlab/v4/objects/events.py98.73% <0.00%> (+5.06%)⬆️
gitlab/mixins.py92.30% <0.00%> (+5.49%)⬆️
... and22 more

@nejch
Copy link
Member

Thanks@JohnVillalovos!

Slightly related to this, I've seen some linters suggest to always use the standardwith open() ... as f: pattern as suggested inhttps://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files, to avoid arbitrary file descriptor names and shadowingfile. Also discourages creating nested managers I assume. But I can't find an example now.

@nejchnejch merged commit1b7cd31 intomainJul 29, 2022
@nejchnejch deleted the jlvillal/encoding_warning branchJuly 29, 2022 08:31
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@JohnVillalovos@codecov-commenter@nejch

[8]ページ先頭

©2009-2025 Movatter.jp