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

Commit380f227

Browse files
chore: fix E741/E742 errors reported by flake8
Fixes to resolve errors for:https://www.flake8rules.com/rules/E741.html Do not use variables named 'I', 'O', or 'l' (E741)https://www.flake8rules.com/rules/E742.html Do not define classes named 'I', 'O', or 'l' (E742)
1 parentaf781c1 commit380f227

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

‎gitlab/tests/mixins/test_mixin_methods.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def resp_cont(url, request):
4444

4545

4646
deftest_refresh_mixin(gl):
47-
classO(RefreshMixin,FakeObject):
47+
classTestClass(RefreshMixin,FakeObject):
4848
pass
4949

5050
@urlmatch(scheme="http",netloc="localhost",path="/api/v4/tests/42",method="get")
@@ -55,7 +55,7 @@ def resp_cont(url, request):
5555

5656
withHTTMock(resp_cont):
5757
mgr=FakeManager(gl)
58-
obj=O(mgr, {"id":42})
58+
obj=TestClass(mgr, {"id":42})
5959
res=obj.refresh()
6060
assertresisNone
6161
assertobj.foo=="bar"
@@ -265,7 +265,7 @@ def test_save_mixin(gl):
265265
classM(UpdateMixin,FakeManager):
266266
pass
267267

268-
classO(SaveMixin,base.RESTObject):
268+
classTestClass(SaveMixin,base.RESTObject):
269269
pass
270270

271271
@urlmatch(scheme="http",netloc="localhost",path="/api/v4/tests/42",method="put")
@@ -276,7 +276,7 @@ def resp_cont(url, request):
276276

277277
withHTTMock(resp_cont):
278278
mgr=M(gl)
279-
obj=O(mgr, {"id":42,"foo":"bar"})
279+
obj=TestClass(mgr, {"id":42,"foo":"bar"})
280280
obj.foo="baz"
281281
obj.save()
282282
assertobj._attrs["foo"]=="baz"

‎gitlab/tests/mixins/test_object_mixins_attributes.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,35 +27,35 @@
2727

2828

2929
deftest_access_request_mixin():
30-
classO(AccessRequestMixin):
30+
classTestClass(AccessRequestMixin):
3131
pass
3232

33-
obj=O()
33+
obj=TestClass()
3434
asserthasattr(obj,"approve")
3535

3636

3737
deftest_subscribable_mixin():
38-
classO(SubscribableMixin):
38+
classTestClass(SubscribableMixin):
3939
pass
4040

41-
obj=O()
41+
obj=TestClass()
4242
asserthasattr(obj,"subscribe")
4343
asserthasattr(obj,"unsubscribe")
4444

4545

4646
deftest_todo_mixin():
47-
classO(TodoMixin):
47+
classTestClass(TodoMixin):
4848
pass
4949

50-
obj=O()
50+
obj=TestClass()
5151
asserthasattr(obj,"todo")
5252

5353

5454
deftest_time_tracking_mixin():
55-
classO(TimeTrackingMixin):
55+
classTestClass(TimeTrackingMixin):
5656
pass
5757

58-
obj=O()
58+
obj=TestClass()
5959
asserthasattr(obj,"time_stats")
6060
asserthasattr(obj,"time_estimate")
6161
asserthasattr(obj,"reset_time_estimate")
@@ -64,16 +64,16 @@ class O(TimeTrackingMixin):
6464

6565

6666
deftest_set_mixin():
67-
classO(SetMixin):
67+
classTestClass(SetMixin):
6868
pass
6969

70-
obj=O()
70+
obj=TestClass()
7171
asserthasattr(obj,"set")
7272

7373

7474
deftest_user_agent_detail_mixin():
75-
classO(UserAgentDetailMixin):
75+
classTestClass(UserAgentDetailMixin):
7676
pass
7777

78-
obj=O()
78+
obj=TestClass()
7979
asserthasattr(obj,"user_agent_detail")

‎gitlab/tests/test_gitlab.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ def test_gitlab_build_list(gl):
8686
assertobj.total==2
8787

8888
withHTTMock(resp_page_2):
89-
l=list(obj)
90-
assertlen(l)==2
91-
assertl[0]["a"]=="b"
92-
assertl[1]["c"]=="d"
89+
test_list=list(obj)
90+
assertlen(test_list)==2
91+
asserttest_list[0]["a"]=="b"
92+
asserttest_list[1]["c"]=="d"
9393

9494

9595
@with_httmock(resp_page_1,resp_page_2)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp