mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 10:43:47 +08:00
Fix: equality vs identity
Changes identity `is` for equality `==` check. To remove python warnings when updating auto complete ``` /usr/local/Cellar/fish/3.0.2/share/fish/tools/deroff.py:770: SyntaxWarning: "is" with a literal. Did you mean "=="? if len(comps) is 2: /usr/local/Cellar/fish/3.0.2/share/fish/tools/deroff.py:954: SyntaxWarning: "is" with a literal. Did you mean "=="? if len(comps) is 2: Parsing man pages and writing completions to /Users/james/.local/share/fish/generated_completions/ 6155 / 6155 : zic.8 ```
This commit is contained in:
parent
939d4674e4
commit
16bf98f928
|
@ -800,7 +800,7 @@ class Deroffer:
|
|||
if self.str_at(0):
|
||||
# Split at whitespace
|
||||
comps = self.s.split(None, 2)
|
||||
if len(comps) is 2:
|
||||
if len(comps) == 2:
|
||||
name, value = comps
|
||||
value = value.rstrip()
|
||||
self.reg_table[name] = value
|
||||
|
@ -998,7 +998,7 @@ class Deroffer:
|
|||
if self.str_at(0):
|
||||
# Split at whitespace
|
||||
comps = self.s.split(None, 2)
|
||||
if len(comps) is 2:
|
||||
if len(comps) == 2:
|
||||
name, value = comps
|
||||
value = value.rstrip()
|
||||
self.reg_table[name] = value
|
||||
|
|
Loading…
Reference in New Issue
Block a user