Opened 5 years ago
Closed 5 years ago
#23356 closed enhancement (fixed)
Another load of Replace 'if x != False' with 'if x', etc.
Reported by: | vklein | Owned by: | vklein |
---|---|---|---|
Priority: | minor | Milestone: | sage-8.0 |
Component: | misc | Keywords: | |
Cc: | Merged in: | ||
Authors: | Vincent Klein | Reviewers: | Travis Scrimshaw |
Report Upstream: | N/A | Work issues: | |
Branch: | d46879c (Commits, GitHub, GitLab) | Commit: | d46879cc65dd10abb9d7747a9a88686693824d5a |
Dependencies: | Stopgaps: |
Description
This ticket follow the discussion of ticket #22889
There are still instances in the Sage library of code like
if A == True: ... if B == False: ... if C == None: ...
which should be changed to
if A: ... if not B: ... if C is None: ...
This ticket goal is to fix the remaining cases identified during the review :
sage/schemes/riemann_surfaces (1 usage found) riemann_surface.py (1 usage found) 1319if (self._differentials == None): sage/calculus (1 usage found) calculus.py (1 usage found) 866if hold == True: sage/interfaces (1 usage found) phc.py (1 usage found) 85if output_list[i-3].count('success') > 0 or get_failures == True: sage/schemes/product_projective (1 usage found) wehlerK3.py (1 usage found) 987if check == True: sage/coding (1 usage found) code_bounds.py (1 usage found) 217if field_based==True and (not is_prime_power(q)): sage/matroids (1 usage found) matroid.pyx (1 usage found) 7718if matroids_plot_helpers.posdict_is_sane(self,pos_dict) ==True: sage/schemes/affine (1 usage found) affine_morphism.py (1 usage found) 678if is_AffineSpace(self.domain())==False:
Change History (5)
comment:1 Changed 5 years ago by
Owner: | set to vklein |
---|
comment:2 Changed 5 years ago by
Branch: | → u/vklein/another_load_of_replace__if_x____false__with__if_x___etc_ |
---|
comment:3 Changed 5 years ago by
Commit: | → d46879cc65dd10abb9d7747a9a88686693824d5a |
---|---|
Status: | new → needs_review |
comment:4 Changed 5 years ago by
Reviewers: | → Travis Scrimshaw |
---|---|
Status: | needs_review → positive_review |
LGTM (assuming the patchbot comes back green).
comment:5 Changed 5 years ago by
Branch: | u/vklein/another_load_of_replace__if_x____false__with__if_x___etc_ → d46879cc65dd10abb9d7747a9a88686693824d5a |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
Note: See
TracTickets for help on using
tickets.
New commits:
trac 23356: replace 'if x == True' with 'if x', etc.