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

Commit630901b

Browse files
chore: fix E711 error reported by flake8
E711: Comparison to none should be 'if cond is none:'https://www.flake8rules.com/rules/E711.html
1 parent83670a4 commit630901b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

‎gitlab/tests/test_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def test_instantiate(self, fake_gitlab, fake_manager):
8080

8181
assert {"foo":"bar"}==obj._attrs
8282
assert {}==obj._updated_attrs
83-
assertNone==obj._create_managers()
83+
assertobj._create_managers()isNone
8484
assertfake_manager==obj.manager
8585
assertfake_gitlab==obj.manager.gitlab
8686

@@ -112,7 +112,7 @@ def test_get_id(self, fake_manager):
112112
assert42==obj.get_id()
113113

114114
obj.id=None
115-
assertNone==obj.get_id()
115+
assertobj.get_id()isNone
116116

117117
deftest_custom_id_attr(self,fake_manager):
118118
classOtherFakeObject(FakeObject):

‎gitlab/tests/test_config.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def test_valid_data(m_open, path_exists):
154154
assert"one"==cp.gitlab_id
155155
assert"http://one.url"==cp.url
156156
assert"ABCDEF"==cp.private_token
157-
assertNone==cp.oauth_token
157+
assertcp.oauth_tokenisNone
158158
assert2==cp.timeout
159159
assertcp.ssl_verifyisTrue
160160
assertcp.per_pageisNone
@@ -166,7 +166,7 @@ def test_valid_data(m_open, path_exists):
166166
assert"two"==cp.gitlab_id
167167
assert"https://two.url"==cp.url
168168
assert"GHIJKL"==cp.private_token
169-
assertNone==cp.oauth_token
169+
assertcp.oauth_tokenisNone
170170
assert10==cp.timeout
171171
assertcp.ssl_verifyisFalse
172172

@@ -177,7 +177,7 @@ def test_valid_data(m_open, path_exists):
177177
assert"three"==cp.gitlab_id
178178
assert"https://three.url"==cp.url
179179
assert"MNOPQR"==cp.private_token
180-
assertNone==cp.oauth_token
180+
assertcp.oauth_tokenisNone
181181
assert2==cp.timeout
182182
assert"/path/to/CA/bundle.crt"==cp.ssl_verify
183183
assert50==cp.per_page
@@ -188,7 +188,7 @@ def test_valid_data(m_open, path_exists):
188188
cp=config.GitlabConfigParser(gitlab_id="four")
189189
assert"four"==cp.gitlab_id
190190
assert"https://four.url"==cp.url
191-
assertNone==cp.private_token
191+
assertcp.private_tokenisNone
192192
assert"STUV"==cp.oauth_token
193193
assert2==cp.timeout
194194
assertcp.ssl_verifyisTrue
@@ -227,7 +227,7 @@ def test_data_from_helper(m_open, path_exists, tmp_path):
227227
cp=config.GitlabConfigParser(gitlab_id="helper")
228228
assert"helper"==cp.gitlab_id
229229
assert"https://helper.url"==cp.url
230-
assertNone==cp.private_token
230+
assertcp.private_tokenisNone
231231
assert"secret"==cp.oauth_token
232232

233233

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp