9
9
10
10
try :
11
11
import shellingham
12
- except ImportError : # pragma: nocover
12
+ except ImportError : # pragma: no cover
13
13
shellingham = None
14
14
15
15
@@ -108,7 +108,7 @@ def install_bash(*, prog_name: str, complete_var: str, shell: str) -> Path:
108
108
rc_content = rc_path .read_text ()
109
109
completion_init_lines = [f"source { completion_path } " ]
110
110
for line in completion_init_lines :
111
- if line not in rc_content : # pragma: nocover
111
+ if line not in rc_content : # pragma: no cover
112
112
rc_content += f"\n { line } "
113
113
rc_content += "\n "
114
114
rc_path .write_text (rc_content )
@@ -135,7 +135,7 @@ def install_zsh(*, prog_name: str, complete_var: str, shell: str) -> Path:
135
135
"fpath+=~/.zfunc" ,
136
136
]
137
137
for line in completion_init_lines :
138
- if line not in zshrc_content : # pragma: nocover
138
+ if line not in zshrc_content : # pragma: no cover
139
139
zshrc_content += f"\n { line } "
140
140
zshrc_content += "\n "
141
141
zshrc_path .write_text (zshrc_content )
@@ -176,17 +176,17 @@ def install_powershell(*, prog_name: str, complete_var: str, shell: str) -> Path
176
176
check = True ,
177
177
stdout = subprocess .PIPE ,
178
178
)
179
- if result .returncode != 0 : # pragma: nocover
179
+ if result .returncode != 0 : # pragma: no cover
180
180
click .echo ("Couldn't get PowerShell user profile" , err = True )
181
181
raise click .exceptions .Exit (result .returncode )
182
182
path_str = ""
183
- if isinstance (result .stdout , str ): # pragma: nocover
183
+ if isinstance (result .stdout , str ): # pragma: no cover
184
184
path_str = result .stdout
185
185
if isinstance (result .stdout , bytes ):
186
186
try :
187
187
# PowerShell would be predominant in Windows
188
188
path_str = result .stdout .decode ("windows-1252" )
189
- except UnicodeDecodeError : # pragma: nocover
189
+ except UnicodeDecodeError : # pragma: no cover
190
190
try :
191
191
path_str = result .stdout .decode ("utf8" )
192
192
except UnicodeDecodeError :
0 commit comments