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

Commita4701a0

Browse files
committed
Remove@NoEffect annotations
+ Add missing asserts, where an expression statement was by itself that was intended as an assertion. This turned out to be the case in the places `@NoEffect` appeared in rendered documentation, making it so no per-file-ignores or other broadened suppressions were needed.+ Fix misspellings (including one case affecting documentation).+ Add a FIXME comment for investigating a free-standing expression statement with no obvious side effects that may have been meant as an assertion but would fail if turned into one.
1 parentd40320b commita4701a0

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

‎test/test_docs.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def update(self, op_code, cur_count, max_count=None, message=""):
167167
open(new_file_path,"wb").close()# create new file in working tree
168168
cloned_repo.index.add([new_file_path])# add it to the index
169169
# Commit the changes to deviate masters history
170-
cloned_repo.index.commit("Added a new file in the past - for latermerege")
170+
cloned_repo.index.commit("Added a new file in the past - for latermerge")
171171

172172
# prepare a merge
173173
master=cloned_repo.heads.master# right-hand side is ahead of us, in the future
@@ -198,7 +198,7 @@ def update(self, op_code, cur_count, max_count=None, message=""):
198198

199199
# .gitmodules was written and added to the index, which is now being committed
200200
cloned_repo.index.commit("Added submodule")
201-
assertsm.exists()andsm.module_exists()# this submodule isdefintely available
201+
assertsm.exists()andsm.module_exists()# this submodule isdefinitely available
202202
sm.remove(module=True,configuration=False)# remove the working tree
203203
assertsm.exists()andnotsm.module_exists()# the submodule itself is still available
204204

@@ -263,9 +263,9 @@ def test_references_and_objects(self, rw_dir):
263263
# [8-test_references_and_objects]
264264
hc=repo.head.commit
265265
hct=hc.tree
266-
hc!=hct# noqa: B015 # @NoEffect
267-
hc!=repo.tags[0]# noqa: B015 # @NoEffect
268-
hc==repo.head.reference.commit# noqa: B015 # @NoEffect
266+
asserthc!=hct
267+
asserthc!=repo.tags[0]
268+
asserthc==repo.head.reference.commit
269269
# ![8-test_references_and_objects]
270270

271271
# [9-test_references_and_objects]

‎test/test_refs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ def test_head_reset(self, rw_repo):
386386
head_tree=head.commit.tree
387387
self.assertRaises(ValueError,setattr,head,"commit",head_tree)
388388
asserthead.commit==old_commit# and the ref did not change
389-
# we allowheds to point to any object
389+
# we allowheads to point to any object
390390
head.object=head_tree
391391
asserthead.object==head_tree
392392
# cannot query tree as commit
@@ -489,7 +489,7 @@ def test_head_reset(self, rw_repo):
489489
cur_head.reference.commit,
490490
)
491491
# it works if the new ref points to the same reference
492-
assertSymbolicReference.create(rw_repo,symref.path,symref.reference).path==symref.path# @NoEffect
492+
assertSymbolicReference.create(rw_repo,symref.path,symref.reference).path==symref.path
493493
SymbolicReference.delete(rw_repo,symref)
494494
# would raise if the symref wouldn't have been deletedpbl
495495
symref=SymbolicReference.create(rw_repo,symref_path,cur_head.reference)

‎test/test_submodule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def _do_base_tests(self, rwrepo):
111111

112112
# force it to reread its information
113113
delsmold._url
114-
smold.url==sm.url# noqa: B015 #@NoEffect
114+
smold.url==sm.url# noqa: B015 #FIXME: Should this be an assertion?
115115

116116
# test config_reader/writer methods
117117
sm.config_reader()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp