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: enable mypy checkstrict_equality#2146

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/mypy_strict_step_by_step
Jul 20, 2022

Conversation

@JohnVillalovos
Copy link
Member

Enable themypystrict_equality check.

@JohnVillalovosJohnVillalovosforce-pushed thejlvillal/mypy_strict_step_by_step branch 3 times, most recently froma0cc815 tod8ba031CompareJuly 15, 2022 02:04
@JohnVillalovosJohnVillalovosforce-pushed thejlvillal/mypy_strict_step_by_step branch fromd8ba031 to8dece89CompareJuly 15, 2022 06:01
@JohnVillalovos
Copy link
MemberAuthor

@nejch I am thinking it might be better to not return anything fromblock andunblock. As they are supposed to raise Exceptions if something goes wrong. The return values are undocumented. So am leaning towards just returningNone. What do you think?

@JohnVillalovosJohnVillalovosforce-pushed thejlvillal/mypy_strict_step_by_step branch 2 times, most recently froma77ca4f to24a9bd7CompareJuly 18, 2022 05:25
@nejch
Copy link
Member

@nejch I am thinking it might be better to not return anything fromblock andunblock. As they are supposed to raise Exceptions if something goes wrong. The return values are undocumented. So am leaning towards just returningNone. What do you think?

I'm thinking it might be best to just return whatever the server returns. This way we don't back ourselves into a corner which seems to have happened with the oldlint() method that no longer returns all the fields the server provides:

post_data= {"content":content}
data=self.http_post("/ci/lint",post_data=post_data,**kwargs)
ifTYPE_CHECKING:
assertnotisinstance(data,requests.Response)
return (data["status"]=="valid",data["errors"])

This way also any breaking changes are only because of GitLab and not us. WDYT?

Enable the `mypy` `strict_equality` check.
@JohnVillalovosJohnVillalovosforce-pushed thejlvillal/mypy_strict_step_by_step branch from24a9bd7 toa29cd6cCompareJuly 19, 2022 23:43
@JohnVillalovos
Copy link
MemberAuthor

I'm thinking it might be best to just return whatever the server returns. This way we don't back ourselves into a corner which seems to have happened with the oldlint() method that no longer returns all the fields the server provides:

This way also any breaking changes are only because of GitLab and not us. WDYT?

Works for me. I have updated it.

Thanks for the review.

@codecov-commenter
Copy link

Codecov Report

Merging#2146 (a29cd6c) intomain (ed110bd) willnot change coverage.
The diff coverage is100.00%.

@@           Coverage Diff           @@##             main    #2146   +/-   ##=======================================  Coverage   95.39%   95.39%           =======================================  Files          79       79             Lines        5149     5149           =======================================  Hits         4912     4912             Misses        237      237
FlagCoverage Δ
api_func_v481.10% <100.00%> (ø)
cli_func_v482.59% <60.00%> (ø)
unit87.00% <60.00%> (ø)

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

Impacted FilesCoverage Δ
gitlab/v4/objects/users.py96.38% <100.00%> (ø)

@nejchnejch merged commitc84379d intomainJul 20, 2022
@nejchnejch deleted the jlvillal/mypy_strict_step_by_step branchJuly 20, 2022 09:36
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nejchnejchAwaiting requested review from nejch

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@nejch@codecov-commenter

[8]ページ先頭

©2009-2025 Movatter.jp