mirror of https://github.com/astral-sh/ruff
Add Applicability to flake8_quotes fixes (#5130)
## Summary Fixes some of #4184
This commit is contained in:
parent
89b328c6be
commit
1e383483f7
|
|
@ -284,8 +284,7 @@ fn docstring(locator: &Locator, range: TextRange, settings: &Settings) -> Option
|
||||||
fixed_contents.push_str("e);
|
fixed_contents.push_str("e);
|
||||||
fixed_contents.push_str(string_contents);
|
fixed_contents.push_str(string_contents);
|
||||||
fixed_contents.push_str("e);
|
fixed_contents.push_str("e);
|
||||||
#[allow(deprecated)]
|
diagnostic.set_fix(Fix::automatic(Edit::range_replacement(
|
||||||
diagnostic.set_fix(Fix::unspecified(Edit::range_replacement(
|
|
||||||
fixed_contents,
|
fixed_contents,
|
||||||
range,
|
range,
|
||||||
)));
|
)));
|
||||||
|
|
@ -358,8 +357,7 @@ fn strings(locator: &Locator, sequence: &[TextRange], settings: &Settings) -> Ve
|
||||||
fixed_contents.push_str(quote);
|
fixed_contents.push_str(quote);
|
||||||
fixed_contents.push_str(string_contents);
|
fixed_contents.push_str(string_contents);
|
||||||
fixed_contents.push_str(quote);
|
fixed_contents.push_str(quote);
|
||||||
#[allow(deprecated)]
|
diagnostic.set_fix(Fix::automatic(Edit::range_replacement(
|
||||||
diagnostic.set_fix(Fix::unspecified(Edit::range_replacement(
|
|
||||||
fixed_contents,
|
fixed_contents,
|
||||||
*range,
|
*range,
|
||||||
)));
|
)));
|
||||||
|
|
@ -425,8 +423,7 @@ fn strings(locator: &Locator, sequence: &[TextRange], settings: &Settings) -> Ve
|
||||||
|
|
||||||
fixed_contents.push(quote);
|
fixed_contents.push(quote);
|
||||||
|
|
||||||
#[allow(deprecated)]
|
diagnostic.set_fix(Fix::automatic(Edit::range_replacement(
|
||||||
diagnostic.set_fix(Fix::unspecified(Edit::range_replacement(
|
|
||||||
fixed_contents,
|
fixed_contents,
|
||||||
*range,
|
*range,
|
||||||
)));
|
)));
|
||||||
|
|
@ -452,8 +449,7 @@ fn strings(locator: &Locator, sequence: &[TextRange], settings: &Settings) -> Ve
|
||||||
fixed_contents.push(quote);
|
fixed_contents.push(quote);
|
||||||
fixed_contents.push_str(string_contents);
|
fixed_contents.push_str(string_contents);
|
||||||
fixed_contents.push(quote);
|
fixed_contents.push(quote);
|
||||||
#[allow(deprecated)]
|
diagnostic.set_fix(Fix::automatic(Edit::range_replacement(
|
||||||
diagnostic.set_fix(Fix::unspecified(Edit::range_replacement(
|
|
||||||
fixed_contents,
|
fixed_contents,
|
||||||
*range,
|
*range,
|
||||||
)));
|
)));
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ docstring_doubles.py:5:1: Q001 [*] Double quote multiline found but single quote
|
||||||
|
|
|
|
||||||
= help: Replace double multiline quotes with single quotes
|
= help: Replace double multiline quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
2 2 | Double quotes multiline module docstring
|
2 2 | Double quotes multiline module docstring
|
||||||
3 3 | """
|
3 3 | """
|
||||||
4 4 |
|
4 4 |
|
||||||
|
|
@ -41,7 +41,7 @@ docstring_doubles.py:16:5: Q001 [*] Double quote multiline found but single quot
|
||||||
|
|
|
|
||||||
= help: Replace double multiline quotes with single quotes
|
= help: Replace double multiline quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
13 13 | Double quotes multiline class docstring
|
13 13 | Double quotes multiline class docstring
|
||||||
14 14 | """
|
14 14 | """
|
||||||
15 15 |
|
15 15 |
|
||||||
|
|
@ -66,7 +66,7 @@ docstring_doubles.py:21:21: Q001 [*] Double quote multiline found but single quo
|
||||||
|
|
|
|
||||||
= help: Replace double multiline quotes with single quotes
|
= help: Replace double multiline quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
18 18 | """
|
18 18 | """
|
||||||
19 19 |
|
19 19 |
|
||||||
20 20 | # The colon in the list indexing below is an edge case for the docstring scanner
|
20 20 | # The colon in the list indexing below is an edge case for the docstring scanner
|
||||||
|
|
@ -92,7 +92,7 @@ docstring_doubles.py:30:9: Q001 [*] Double quote multiline found but single quot
|
||||||
|
|
|
|
||||||
= help: Replace double multiline quotes with single quotes
|
= help: Replace double multiline quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
27 27 |
|
27 27 |
|
||||||
28 28 | some_expression = 'hello world'
|
28 28 | some_expression = 'hello world'
|
||||||
29 29 |
|
29 29 |
|
||||||
|
|
@ -117,7 +117,7 @@ docstring_doubles.py:35:13: Q001 [*] Double quote multiline found but single quo
|
||||||
|
|
|
|
||||||
= help: Replace double multiline quotes with single quotes
|
= help: Replace double multiline quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
32 32 | """
|
32 32 | """
|
||||||
33 33 |
|
33 33 |
|
||||||
34 34 | if l:
|
34 34 | if l:
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ docstring_doubles_class.py:3:5: Q001 [*] Double quote multiline found but single
|
||||||
|
|
|
|
||||||
= help: Replace double multiline quotes with single quotes
|
= help: Replace double multiline quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 1 | class SingleLineDocstrings():
|
1 1 | class SingleLineDocstrings():
|
||||||
2 2 | """ Double quotes single line class docstring """
|
2 2 | """ Double quotes single line class docstring """
|
||||||
3 |- """ Not a docstring """
|
3 |- """ Not a docstring """
|
||||||
|
|
@ -32,7 +32,7 @@ docstring_doubles_class.py:5:23: Q001 [*] Double quote multiline found but singl
|
||||||
|
|
|
|
||||||
= help: Replace double multiline quotes with single quotes
|
= help: Replace double multiline quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
2 2 | """ Double quotes single line class docstring """
|
2 2 | """ Double quotes single line class docstring """
|
||||||
3 3 | """ Not a docstring """
|
3 3 | """ Not a docstring """
|
||||||
4 4 |
|
4 4 |
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ docstring_doubles_function.py:3:5: Q001 [*] Double quote multiline found but sin
|
||||||
|
|
|
|
||||||
= help: Replace double multiline quotes with single quotes
|
= help: Replace double multiline quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 1 | def foo():
|
1 1 | def foo():
|
||||||
2 2 | """function without params, single line docstring"""
|
2 2 | """function without params, single line docstring"""
|
||||||
3 |- """ not a docstring"""
|
3 |- """ not a docstring"""
|
||||||
|
|
@ -30,7 +30,7 @@ docstring_doubles_function.py:11:5: Q001 [*] Double quote multiline found but si
|
||||||
|
|
|
|
||||||
= help: Replace double multiline quotes with single quotes
|
= help: Replace double multiline quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
8 8 | """
|
8 8 | """
|
||||||
9 9 | function without params, multiline docstring
|
9 9 | function without params, multiline docstring
|
||||||
10 10 | """
|
10 10 | """
|
||||||
|
|
@ -51,7 +51,7 @@ docstring_doubles_function.py:15:39: Q001 [*] Double quote multiline found but s
|
||||||
|
|
|
|
||||||
= help: Replace double multiline quotes with single quotes
|
= help: Replace double multiline quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
12 12 | return
|
12 12 | return
|
||||||
13 13 |
|
13 13 |
|
||||||
14 14 |
|
14 14 |
|
||||||
|
|
@ -74,7 +74,7 @@ docstring_doubles_function.py:17:5: Q001 [*] Double quote multiline found but si
|
||||||
|
|
|
|
||||||
= help: Replace double multiline quotes with single quotes
|
= help: Replace double multiline quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
14 14 |
|
14 14 |
|
||||||
15 15 | def fun_with_params_no_docstring(a, b="""
|
15 15 | def fun_with_params_no_docstring(a, b="""
|
||||||
16 16 | not a
|
16 16 | not a
|
||||||
|
|
@ -93,7 +93,7 @@ docstring_doubles_function.py:22:5: Q001 [*] Double quote multiline found but si
|
||||||
|
|
|
|
||||||
= help: Replace double multiline quotes with single quotes
|
= help: Replace double multiline quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
19 19 |
|
19 19 |
|
||||||
20 20 |
|
20 20 |
|
||||||
21 21 | def fun_with_params_no_docstring2(a, b=c[foo():], c=\
|
21 21 | def fun_with_params_no_docstring2(a, b=c[foo():], c=\
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ docstring_doubles_module_multiline.py:4:1: Q001 [*] Double quote multiline found
|
||||||
|
|
|
|
||||||
= help: Replace double multiline quotes with single quotes
|
= help: Replace double multiline quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 1 | """
|
1 1 | """
|
||||||
2 2 | Double quotes multiline module docstring
|
2 2 | Double quotes multiline module docstring
|
||||||
3 3 | """
|
3 3 | """
|
||||||
|
|
@ -38,7 +38,7 @@ docstring_doubles_module_multiline.py:9:1: Q001 [*] Double quote multiline found
|
||||||
|
|
|
|
||||||
= help: Replace double multiline quotes with single quotes
|
= help: Replace double multiline quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
6 6 | """
|
6 6 | """
|
||||||
7 7 | def foo():
|
7 7 | def foo():
|
||||||
8 8 | pass
|
8 8 | pass
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ docstring_doubles_module_singleline.py:2:1: Q001 [*] Double quote multiline foun
|
||||||
|
|
|
|
||||||
= help: Replace double multiline quotes with single quotes
|
= help: Replace double multiline quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 1 | """ Double quotes singleline module docstring """
|
1 1 | """ Double quotes singleline module docstring """
|
||||||
2 |-""" this is not a docstring """
|
2 |-""" this is not a docstring """
|
||||||
2 |+''' this is not a docstring '''
|
2 |+''' this is not a docstring '''
|
||||||
|
|
@ -28,7 +28,7 @@ docstring_doubles_module_singleline.py:6:1: Q001 [*] Double quote multiline foun
|
||||||
|
|
|
|
||||||
= help: Replace double multiline quotes with single quotes
|
= help: Replace double multiline quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
3 3 |
|
3 3 |
|
||||||
4 4 | def foo():
|
4 4 | def foo():
|
||||||
5 5 | pass
|
5 5 | pass
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ docstring_singles.py:1:1: Q002 [*] Single quote docstring found but double quote
|
||||||
|
|
|
|
||||||
= help: Replace single quotes docstring with double quotes
|
= help: Replace single quotes docstring with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 |-'''
|
1 |-'''
|
||||||
1 |+"""
|
1 |+"""
|
||||||
2 2 | Single quotes multiline module docstring
|
2 2 | Single quotes multiline module docstring
|
||||||
|
|
@ -36,7 +36,7 @@ docstring_singles.py:14:5: Q002 [*] Single quote docstring found but double quot
|
||||||
|
|
|
|
||||||
= help: Replace single quotes docstring with double quotes
|
= help: Replace single quotes docstring with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
11 11 | class Cls(MakeKlass('''
|
11 11 | class Cls(MakeKlass('''
|
||||||
12 12 | class params \t not a docstring
|
12 12 | class params \t not a docstring
|
||||||
13 13 | ''')):
|
13 13 | ''')):
|
||||||
|
|
@ -63,7 +63,7 @@ docstring_singles.py:26:9: Q002 [*] Single quote docstring found but double quot
|
||||||
|
|
|
|
||||||
= help: Replace single quotes docstring with double quotes
|
= help: Replace single quotes docstring with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
23 23 | def f(self, bar='''
|
23 23 | def f(self, bar='''
|
||||||
24 24 | definitely not a docstring''',
|
24 24 | definitely not a docstring''',
|
||||||
25 25 | val=l[Cls():3]):
|
25 25 | val=l[Cls():3]):
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ docstring_singles_class.py:2:5: Q002 [*] Single quote docstring found but double
|
||||||
|
|
|
|
||||||
= help: Replace single quotes docstring with double quotes
|
= help: Replace single quotes docstring with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 1 | class SingleLineDocstrings():
|
1 1 | class SingleLineDocstrings():
|
||||||
2 |- ''' Double quotes single line class docstring '''
|
2 |- ''' Double quotes single line class docstring '''
|
||||||
2 |+ """ Double quotes single line class docstring """
|
2 |+ """ Double quotes single line class docstring """
|
||||||
|
|
@ -27,7 +27,7 @@ docstring_singles_class.py:6:9: Q002 [*] Single quote docstring found but double
|
||||||
|
|
|
|
||||||
= help: Replace single quotes docstring with double quotes
|
= help: Replace single quotes docstring with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
3 3 | ''' Not a docstring '''
|
3 3 | ''' Not a docstring '''
|
||||||
4 4 |
|
4 4 |
|
||||||
5 5 | def foo(self, bar='''not a docstring'''):
|
5 5 | def foo(self, bar='''not a docstring'''):
|
||||||
|
|
@ -46,7 +46,7 @@ docstring_singles_class.py:9:29: Q002 [*] Single quote docstring found but doubl
|
||||||
|
|
|
|
||||||
= help: Replace single quotes docstring with double quotes
|
= help: Replace single quotes docstring with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
6 6 | ''' Double quotes single line method docstring'''
|
6 6 | ''' Double quotes single line method docstring'''
|
||||||
7 7 | pass
|
7 7 | pass
|
||||||
8 8 |
|
8 8 |
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ docstring_singles_function.py:2:5: Q002 [*] Single quote docstring found but dou
|
||||||
|
|
|
|
||||||
= help: Replace single quotes docstring with double quotes
|
= help: Replace single quotes docstring with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 1 | def foo():
|
1 1 | def foo():
|
||||||
2 |- '''function without params, single line docstring'''
|
2 |- '''function without params, single line docstring'''
|
||||||
2 |+ """function without params, single line docstring"""
|
2 |+ """function without params, single line docstring"""
|
||||||
|
|
@ -32,7 +32,7 @@ docstring_singles_function.py:8:5: Q002 [*] Single quote docstring found but dou
|
||||||
|
|
|
|
||||||
= help: Replace single quotes docstring with double quotes
|
= help: Replace single quotes docstring with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
5 5 |
|
5 5 |
|
||||||
6 6 |
|
6 6 |
|
||||||
7 7 | def foo2():
|
7 7 | def foo2():
|
||||||
|
|
@ -53,7 +53,7 @@ docstring_singles_function.py:27:5: Q002 [*] Single quote docstring found but do
|
||||||
|
|
|
|
||||||
= help: Replace single quotes docstring with double quotes
|
= help: Replace single quotes docstring with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
24 24 |
|
24 24 |
|
||||||
25 25 |
|
25 25 |
|
||||||
26 26 | def function_with_single_docstring(a):
|
26 26 | def function_with_single_docstring(a):
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ docstring_singles_module_multiline.py:1:1: Q002 [*] Single quote docstring found
|
||||||
|
|
|
|
||||||
= help: Replace single quotes docstring with double quotes
|
= help: Replace single quotes docstring with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 |-'''
|
1 |-'''
|
||||||
1 |+"""
|
1 |+"""
|
||||||
2 2 | Double quotes multiline module docstring
|
2 2 | Double quotes multiline module docstring
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ docstring_singles_module_singleline.py:1:1: Q002 [*] Single quote docstring foun
|
||||||
|
|
|
|
||||||
= help: Replace single quotes docstring with double quotes
|
= help: Replace single quotes docstring with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 |-''' Double quotes singleline module docstring '''
|
1 |-''' Double quotes singleline module docstring '''
|
||||||
1 |+""" Double quotes singleline module docstring """
|
1 |+""" Double quotes singleline module docstring """
|
||||||
2 2 | ''' this is not a docstring '''
|
2 2 | ''' this is not a docstring '''
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ docstring_doubles.py:1:1: Q002 [*] Double quote docstring found but single quote
|
||||||
|
|
|
|
||||||
= help: Replace double quotes docstring with single quotes
|
= help: Replace double quotes docstring with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 |-"""
|
1 |-"""
|
||||||
1 |+'''
|
1 |+'''
|
||||||
2 2 | Double quotes multiline module docstring
|
2 2 | Double quotes multiline module docstring
|
||||||
|
|
@ -35,7 +35,7 @@ docstring_doubles.py:12:5: Q002 [*] Double quote docstring found but single quot
|
||||||
|
|
|
|
||||||
= help: Replace double quotes docstring with single quotes
|
= help: Replace double quotes docstring with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
9 9 | l = []
|
9 9 | l = []
|
||||||
10 10 |
|
10 10 |
|
||||||
11 11 | class Cls:
|
11 11 | class Cls:
|
||||||
|
|
@ -62,7 +62,7 @@ docstring_doubles.py:24:9: Q002 [*] Double quote docstring found but single quot
|
||||||
|
|
|
|
||||||
= help: Replace double quotes docstring with single quotes
|
= help: Replace double quotes docstring with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
21 21 | def f(self, bar="""
|
21 21 | def f(self, bar="""
|
||||||
22 22 | definitely not a docstring""",
|
22 22 | definitely not a docstring""",
|
||||||
23 23 | val=l[Cls():3]):
|
23 23 | val=l[Cls():3]):
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ docstring_doubles_class.py:2:5: Q002 [*] Double quote docstring found but single
|
||||||
|
|
|
|
||||||
= help: Replace double quotes docstring with single quotes
|
= help: Replace double quotes docstring with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 1 | class SingleLineDocstrings():
|
1 1 | class SingleLineDocstrings():
|
||||||
2 |- """ Double quotes single line class docstring """
|
2 |- """ Double quotes single line class docstring """
|
||||||
2 |+ ''' Double quotes single line class docstring '''
|
2 |+ ''' Double quotes single line class docstring '''
|
||||||
|
|
@ -27,7 +27,7 @@ docstring_doubles_class.py:6:9: Q002 [*] Double quote docstring found but single
|
||||||
|
|
|
|
||||||
= help: Replace double quotes docstring with single quotes
|
= help: Replace double quotes docstring with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
3 3 | """ Not a docstring """
|
3 3 | """ Not a docstring """
|
||||||
4 4 |
|
4 4 |
|
||||||
5 5 | def foo(self, bar="""not a docstring"""):
|
5 5 | def foo(self, bar="""not a docstring"""):
|
||||||
|
|
@ -46,7 +46,7 @@ docstring_doubles_class.py:9:29: Q002 [*] Double quote docstring found but singl
|
||||||
|
|
|
|
||||||
= help: Replace double quotes docstring with single quotes
|
= help: Replace double quotes docstring with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
6 6 | """ Double quotes single line method docstring"""
|
6 6 | """ Double quotes single line method docstring"""
|
||||||
7 7 | pass
|
7 7 | pass
|
||||||
8 8 |
|
8 8 |
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ docstring_doubles_function.py:2:5: Q002 [*] Double quote docstring found but sin
|
||||||
|
|
|
|
||||||
= help: Replace double quotes docstring with single quotes
|
= help: Replace double quotes docstring with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 1 | def foo():
|
1 1 | def foo():
|
||||||
2 |- """function without params, single line docstring"""
|
2 |- """function without params, single line docstring"""
|
||||||
2 |+ '''function without params, single line docstring'''
|
2 |+ '''function without params, single line docstring'''
|
||||||
|
|
@ -32,7 +32,7 @@ docstring_doubles_function.py:8:5: Q002 [*] Double quote docstring found but sin
|
||||||
|
|
|
|
||||||
= help: Replace double quotes docstring with single quotes
|
= help: Replace double quotes docstring with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
5 5 |
|
5 5 |
|
||||||
6 6 |
|
6 6 |
|
||||||
7 7 | def foo2():
|
7 7 | def foo2():
|
||||||
|
|
@ -53,7 +53,7 @@ docstring_doubles_function.py:27:5: Q002 [*] Double quote docstring found but si
|
||||||
|
|
|
|
||||||
= help: Replace double quotes docstring with single quotes
|
= help: Replace double quotes docstring with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
24 24 |
|
24 24 |
|
||||||
25 25 |
|
25 25 |
|
||||||
26 26 | def function_with_single_docstring(a):
|
26 26 | def function_with_single_docstring(a):
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ docstring_doubles_module_multiline.py:1:1: Q002 [*] Double quote docstring found
|
||||||
|
|
|
|
||||||
= help: Replace double quotes docstring with single quotes
|
= help: Replace double quotes docstring with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 |-"""
|
1 |-"""
|
||||||
1 |+'''
|
1 |+'''
|
||||||
2 2 | Double quotes multiline module docstring
|
2 2 | Double quotes multiline module docstring
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ docstring_doubles_module_singleline.py:1:1: Q002 [*] Double quote docstring foun
|
||||||
|
|
|
|
||||||
= help: Replace double quotes docstring with single quotes
|
= help: Replace double quotes docstring with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 |-""" Double quotes singleline module docstring """
|
1 |-""" Double quotes singleline module docstring """
|
||||||
1 |+''' Double quotes singleline module docstring '''
|
1 |+''' Double quotes singleline module docstring '''
|
||||||
2 2 | """ this is not a docstring """
|
2 2 | """ this is not a docstring """
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ docstring_singles.py:5:1: Q001 [*] Single quote multiline found but double quote
|
||||||
|
|
|
|
||||||
= help: Replace single multiline quotes with double quotes
|
= help: Replace single multiline quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
2 2 | Single quotes multiline module docstring
|
2 2 | Single quotes multiline module docstring
|
||||||
3 3 | '''
|
3 3 | '''
|
||||||
4 4 |
|
4 4 |
|
||||||
|
|
@ -41,7 +41,7 @@ docstring_singles.py:11:21: Q001 [*] Single quote multiline found but double quo
|
||||||
|
|
|
|
||||||
= help: Replace single multiline quotes with double quotes
|
= help: Replace single multiline quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
8 8 |
|
8 8 |
|
||||||
9 9 | l = []
|
9 9 | l = []
|
||||||
10 10 |
|
10 10 |
|
||||||
|
|
@ -68,7 +68,7 @@ docstring_singles.py:18:5: Q001 [*] Single quote multiline found but double quot
|
||||||
|
|
|
|
||||||
= help: Replace single multiline quotes with double quotes
|
= help: Replace single multiline quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
15 15 | Single quotes multiline class docstring
|
15 15 | Single quotes multiline class docstring
|
||||||
16 16 | '''
|
16 16 | '''
|
||||||
17 17 |
|
17 17 |
|
||||||
|
|
@ -93,7 +93,7 @@ docstring_singles.py:23:21: Q001 [*] Single quote multiline found but double quo
|
||||||
|
|
|
|
||||||
= help: Replace single multiline quotes with double quotes
|
= help: Replace single multiline quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
20 20 | '''
|
20 20 | '''
|
||||||
21 21 |
|
21 21 |
|
||||||
22 22 | # The colon in the list indexing below is an edge case for the docstring scanner
|
22 22 | # The colon in the list indexing below is an edge case for the docstring scanner
|
||||||
|
|
@ -119,7 +119,7 @@ docstring_singles.py:32:9: Q001 [*] Single quote multiline found but double quot
|
||||||
|
|
|
|
||||||
= help: Replace single multiline quotes with double quotes
|
= help: Replace single multiline quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
29 29 |
|
29 29 |
|
||||||
30 30 | some_expression = 'hello world'
|
30 30 | some_expression = 'hello world'
|
||||||
31 31 |
|
31 31 |
|
||||||
|
|
@ -144,7 +144,7 @@ docstring_singles.py:37:13: Q001 [*] Single quote multiline found but double quo
|
||||||
|
|
|
|
||||||
= help: Replace single multiline quotes with double quotes
|
= help: Replace single multiline quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
34 34 | '''
|
34 34 | '''
|
||||||
35 35 |
|
35 35 |
|
||||||
36 36 | if l:
|
36 36 | if l:
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ docstring_singles_class.py:3:5: Q001 [*] Single quote multiline found but double
|
||||||
|
|
|
|
||||||
= help: Replace single multiline quotes with double quotes
|
= help: Replace single multiline quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 1 | class SingleLineDocstrings():
|
1 1 | class SingleLineDocstrings():
|
||||||
2 2 | ''' Double quotes single line class docstring '''
|
2 2 | ''' Double quotes single line class docstring '''
|
||||||
3 |- ''' Not a docstring '''
|
3 |- ''' Not a docstring '''
|
||||||
|
|
@ -32,7 +32,7 @@ docstring_singles_class.py:5:23: Q001 [*] Single quote multiline found but doubl
|
||||||
|
|
|
|
||||||
= help: Replace single multiline quotes with double quotes
|
= help: Replace single multiline quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
2 2 | ''' Double quotes single line class docstring '''
|
2 2 | ''' Double quotes single line class docstring '''
|
||||||
3 3 | ''' Not a docstring '''
|
3 3 | ''' Not a docstring '''
|
||||||
4 4 |
|
4 4 |
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ docstring_singles_function.py:3:5: Q001 [*] Single quote multiline found but dou
|
||||||
|
|
|
|
||||||
= help: Replace single multiline quotes with double quotes
|
= help: Replace single multiline quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 1 | def foo():
|
1 1 | def foo():
|
||||||
2 2 | '''function without params, single line docstring'''
|
2 2 | '''function without params, single line docstring'''
|
||||||
3 |- ''' not a docstring'''
|
3 |- ''' not a docstring'''
|
||||||
|
|
@ -30,7 +30,7 @@ docstring_singles_function.py:11:5: Q001 [*] Single quote multiline found but do
|
||||||
|
|
|
|
||||||
= help: Replace single multiline quotes with double quotes
|
= help: Replace single multiline quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
8 8 | '''
|
8 8 | '''
|
||||||
9 9 | function without params, multiline docstring
|
9 9 | function without params, multiline docstring
|
||||||
10 10 | '''
|
10 10 | '''
|
||||||
|
|
@ -51,7 +51,7 @@ docstring_singles_function.py:15:39: Q001 [*] Single quote multiline found but d
|
||||||
|
|
|
|
||||||
= help: Replace single multiline quotes with double quotes
|
= help: Replace single multiline quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
12 12 | return
|
12 12 | return
|
||||||
13 13 |
|
13 13 |
|
||||||
14 14 |
|
14 14 |
|
||||||
|
|
@ -74,7 +74,7 @@ docstring_singles_function.py:17:5: Q001 [*] Single quote multiline found but do
|
||||||
|
|
|
|
||||||
= help: Replace single multiline quotes with double quotes
|
= help: Replace single multiline quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
14 14 |
|
14 14 |
|
||||||
15 15 | def fun_with_params_no_docstring(a, b='''
|
15 15 | def fun_with_params_no_docstring(a, b='''
|
||||||
16 16 | not a
|
16 16 | not a
|
||||||
|
|
@ -93,7 +93,7 @@ docstring_singles_function.py:22:5: Q001 [*] Single quote multiline found but do
|
||||||
|
|
|
|
||||||
= help: Replace single multiline quotes with double quotes
|
= help: Replace single multiline quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
19 19 |
|
19 19 |
|
||||||
20 20 |
|
20 20 |
|
||||||
21 21 | def fun_with_params_no_docstring2(a, b=c[foo():], c=\
|
21 21 | def fun_with_params_no_docstring2(a, b=c[foo():], c=\
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ docstring_singles_module_multiline.py:4:1: Q001 [*] Single quote multiline found
|
||||||
|
|
|
|
||||||
= help: Replace single multiline quotes with double quotes
|
= help: Replace single multiline quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 1 | '''
|
1 1 | '''
|
||||||
2 2 | Double quotes multiline module docstring
|
2 2 | Double quotes multiline module docstring
|
||||||
3 3 | '''
|
3 3 | '''
|
||||||
|
|
@ -38,7 +38,7 @@ docstring_singles_module_multiline.py:9:1: Q001 [*] Single quote multiline found
|
||||||
|
|
|
|
||||||
= help: Replace single multiline quotes with double quotes
|
= help: Replace single multiline quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
6 6 | '''
|
6 6 | '''
|
||||||
7 7 | def foo():
|
7 7 | def foo():
|
||||||
8 8 | pass
|
8 8 | pass
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ docstring_singles_module_singleline.py:2:1: Q001 [*] Single quote multiline foun
|
||||||
|
|
|
|
||||||
= help: Replace single multiline quotes with double quotes
|
= help: Replace single multiline quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 1 | ''' Double quotes singleline module docstring '''
|
1 1 | ''' Double quotes singleline module docstring '''
|
||||||
2 |-''' this is not a docstring '''
|
2 |-''' this is not a docstring '''
|
||||||
2 |+""" this is not a docstring """
|
2 |+""" this is not a docstring """
|
||||||
|
|
@ -28,7 +28,7 @@ docstring_singles_module_singleline.py:6:1: Q001 [*] Single quote multiline foun
|
||||||
|
|
|
|
||||||
= help: Replace single multiline quotes with double quotes
|
= help: Replace single multiline quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
3 3 |
|
3 3 |
|
||||||
4 4 | def foo():
|
4 4 | def foo():
|
||||||
5 5 | pass
|
5 5 | pass
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ singles.py:1:25: Q000 [*] Single quotes found but double quotes preferred
|
||||||
|
|
|
|
||||||
= help: Replace single quotes with double quotes
|
= help: Replace single quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 |-this_should_be_linted = 'single quote string'
|
1 |-this_should_be_linted = 'single quote string'
|
||||||
1 |+this_should_be_linted = "single quote string"
|
1 |+this_should_be_linted = "single quote string"
|
||||||
2 2 | this_should_be_linted = u'double quote string'
|
2 2 | this_should_be_linted = u'double quote string'
|
||||||
|
|
@ -27,7 +27,7 @@ singles.py:2:25: Q000 [*] Single quotes found but double quotes preferred
|
||||||
|
|
|
|
||||||
= help: Replace single quotes with double quotes
|
= help: Replace single quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 1 | this_should_be_linted = 'single quote string'
|
1 1 | this_should_be_linted = 'single quote string'
|
||||||
2 |-this_should_be_linted = u'double quote string'
|
2 |-this_should_be_linted = u'double quote string'
|
||||||
2 |+this_should_be_linted = u"double quote string"
|
2 |+this_should_be_linted = u"double quote string"
|
||||||
|
|
@ -44,7 +44,7 @@ singles.py:3:25: Q000 [*] Single quotes found but double quotes preferred
|
||||||
|
|
|
|
||||||
= help: Replace single quotes with double quotes
|
= help: Replace single quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 1 | this_should_be_linted = 'single quote string'
|
1 1 | this_should_be_linted = 'single quote string'
|
||||||
2 2 | this_should_be_linted = u'double quote string'
|
2 2 | this_should_be_linted = u'double quote string'
|
||||||
3 |-this_should_be_linted = f'double quote string'
|
3 |-this_should_be_linted = f'double quote string'
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ singles_escaped.py:1:26: Q003 [*] Change outer quotes to avoid escaping inner qu
|
||||||
|
|
|
|
||||||
= help: Change outer quotes to avoid escaping inner quotes
|
= help: Change outer quotes to avoid escaping inner quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 |-this_should_raise_Q003 = "This is a \"string\""
|
1 |-this_should_raise_Q003 = "This is a \"string\""
|
||||||
1 |+this_should_raise_Q003 = 'This is a "string"'
|
1 |+this_should_raise_Q003 = 'This is a "string"'
|
||||||
2 2 | this_is_fine = "'This' is a \"string\""
|
2 2 | this_is_fine = "'This' is a \"string\""
|
||||||
|
|
@ -27,7 +27,7 @@ singles_escaped.py:9:5: Q003 [*] Change outer quotes to avoid escaping inner quo
|
||||||
|
|
|
|
||||||
= help: Change outer quotes to avoid escaping inner quotes
|
= help: Change outer quotes to avoid escaping inner quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
6 6 | this_is_fine = R"This is a \"string\""
|
6 6 | this_is_fine = R"This is a \"string\""
|
||||||
7 7 | this_should_raise = (
|
7 7 | this_should_raise = (
|
||||||
8 8 | "This is a"
|
8 8 | "This is a"
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ singles_implicit.py:2:5: Q000 [*] Single quotes found but double quotes preferre
|
||||||
|
|
|
|
||||||
= help: Replace single quotes with double quotes
|
= help: Replace single quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 1 | x = (
|
1 1 | x = (
|
||||||
2 |- 'This'
|
2 |- 'This'
|
||||||
2 |+ "This"
|
2 |+ "This"
|
||||||
|
|
@ -30,7 +30,7 @@ singles_implicit.py:3:5: Q000 [*] Single quotes found but double quotes preferre
|
||||||
|
|
|
|
||||||
= help: Replace single quotes with double quotes
|
= help: Replace single quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 1 | x = (
|
1 1 | x = (
|
||||||
2 2 | 'This'
|
2 2 | 'This'
|
||||||
3 |- 'is'
|
3 |- 'is'
|
||||||
|
|
@ -49,7 +49,7 @@ singles_implicit.py:4:5: Q000 [*] Single quotes found but double quotes preferre
|
||||||
|
|
|
|
||||||
= help: Replace single quotes with double quotes
|
= help: Replace single quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 1 | x = (
|
1 1 | x = (
|
||||||
2 2 | 'This'
|
2 2 | 'This'
|
||||||
3 3 | 'is'
|
3 3 | 'is'
|
||||||
|
|
@ -69,7 +69,7 @@ singles_implicit.py:8:5: Q000 [*] Single quotes found but double quotes preferre
|
||||||
|
|
|
|
||||||
= help: Replace single quotes with double quotes
|
= help: Replace single quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
5 5 | )
|
5 5 | )
|
||||||
6 6 |
|
6 6 |
|
||||||
7 7 | x = (
|
7 7 | x = (
|
||||||
|
|
@ -90,7 +90,7 @@ singles_implicit.py:9:5: Q000 [*] Single quotes found but double quotes preferre
|
||||||
|
|
|
|
||||||
= help: Replace single quotes with double quotes
|
= help: Replace single quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
6 6 |
|
6 6 |
|
||||||
7 7 | x = (
|
7 7 | x = (
|
||||||
8 8 | 'This' \
|
8 8 | 'This' \
|
||||||
|
|
@ -110,7 +110,7 @@ singles_implicit.py:10:5: Q000 [*] Single quotes found but double quotes preferr
|
||||||
|
|
|
|
||||||
= help: Replace single quotes with double quotes
|
= help: Replace single quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
7 7 | x = (
|
7 7 | x = (
|
||||||
8 8 | 'This' \
|
8 8 | 'This' \
|
||||||
9 9 | 'is' \
|
9 9 | 'is' \
|
||||||
|
|
@ -129,7 +129,7 @@ singles_implicit.py:27:1: Q000 [*] Single quotes found but double quotes preferr
|
||||||
|
|
|
|
||||||
= help: Replace single quotes with double quotes
|
= help: Replace single quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
24 24 |
|
24 24 |
|
||||||
25 25 | if True:
|
25 25 | if True:
|
||||||
26 26 | 'This can use "single" quotes'
|
26 26 | 'This can use "single" quotes'
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ singles_multiline_string.py:1:5: Q001 [*] Single quote multiline found but doubl
|
||||||
|
|
|
|
||||||
= help: Replace single multiline quotes with double quotes
|
= help: Replace single multiline quotes with double quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 |-s = ''' This 'should'
|
1 |-s = ''' This 'should'
|
||||||
1 |+s = """ This 'should'
|
1 |+s = """ This 'should'
|
||||||
2 2 | be
|
2 2 | be
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ doubles.py:1:25: Q000 [*] Double quotes found but single quotes preferred
|
||||||
|
|
|
|
||||||
= help: Replace double quotes with single quotes
|
= help: Replace double quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 |-this_should_be_linted = "double quote string"
|
1 |-this_should_be_linted = "double quote string"
|
||||||
1 |+this_should_be_linted = 'double quote string'
|
1 |+this_should_be_linted = 'double quote string'
|
||||||
2 2 | this_should_be_linted = u"double quote string"
|
2 2 | this_should_be_linted = u"double quote string"
|
||||||
|
|
@ -27,7 +27,7 @@ doubles.py:2:25: Q000 [*] Double quotes found but single quotes preferred
|
||||||
|
|
|
|
||||||
= help: Replace double quotes with single quotes
|
= help: Replace double quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 1 | this_should_be_linted = "double quote string"
|
1 1 | this_should_be_linted = "double quote string"
|
||||||
2 |-this_should_be_linted = u"double quote string"
|
2 |-this_should_be_linted = u"double quote string"
|
||||||
2 |+this_should_be_linted = u'double quote string'
|
2 |+this_should_be_linted = u'double quote string'
|
||||||
|
|
@ -44,7 +44,7 @@ doubles.py:3:25: Q000 [*] Double quotes found but single quotes preferred
|
||||||
|
|
|
|
||||||
= help: Replace double quotes with single quotes
|
= help: Replace double quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 1 | this_should_be_linted = "double quote string"
|
1 1 | this_should_be_linted = "double quote string"
|
||||||
2 2 | this_should_be_linted = u"double quote string"
|
2 2 | this_should_be_linted = u"double quote string"
|
||||||
3 |-this_should_be_linted = f"double quote string"
|
3 |-this_should_be_linted = f"double quote string"
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ doubles_escaped.py:1:26: Q003 [*] Change outer quotes to avoid escaping inner qu
|
||||||
|
|
|
|
||||||
= help: Change outer quotes to avoid escaping inner quotes
|
= help: Change outer quotes to avoid escaping inner quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 |-this_should_raise_Q003 = 'This is a \'string\''
|
1 |-this_should_raise_Q003 = 'This is a \'string\''
|
||||||
1 |+this_should_raise_Q003 = "This is a 'string'"
|
1 |+this_should_raise_Q003 = "This is a 'string'"
|
||||||
2 2 | this_should_raise_Q003 = 'This is \\ a \\\'string\''
|
2 2 | this_should_raise_Q003 = 'This is \\ a \\\'string\''
|
||||||
|
|
@ -27,7 +27,7 @@ doubles_escaped.py:2:26: Q003 [*] Change outer quotes to avoid escaping inner qu
|
||||||
|
|
|
|
||||||
= help: Change outer quotes to avoid escaping inner quotes
|
= help: Change outer quotes to avoid escaping inner quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 1 | this_should_raise_Q003 = 'This is a \'string\''
|
1 1 | this_should_raise_Q003 = 'This is a \'string\''
|
||||||
2 |-this_should_raise_Q003 = 'This is \\ a \\\'string\''
|
2 |-this_should_raise_Q003 = 'This is \\ a \\\'string\''
|
||||||
2 |+this_should_raise_Q003 = "This is \\ a \\'string'"
|
2 |+this_should_raise_Q003 = "This is \\ a \\'string'"
|
||||||
|
|
@ -45,7 +45,7 @@ doubles_escaped.py:10:5: Q003 [*] Change outer quotes to avoid escaping inner qu
|
||||||
|
|
|
|
||||||
= help: Change outer quotes to avoid escaping inner quotes
|
= help: Change outer quotes to avoid escaping inner quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
7 7 | this_is_fine = R'This is a \'string\''
|
7 7 | this_is_fine = R'This is a \'string\''
|
||||||
8 8 | this_should_raise = (
|
8 8 | this_should_raise = (
|
||||||
9 9 | 'This is a'
|
9 9 | 'This is a'
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ doubles_implicit.py:2:5: Q000 [*] Double quotes found but single quotes preferre
|
||||||
|
|
|
|
||||||
= help: Replace double quotes with single quotes
|
= help: Replace double quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 1 | x = (
|
1 1 | x = (
|
||||||
2 |- "This"
|
2 |- "This"
|
||||||
2 |+ 'This'
|
2 |+ 'This'
|
||||||
|
|
@ -30,7 +30,7 @@ doubles_implicit.py:3:5: Q000 [*] Double quotes found but single quotes preferre
|
||||||
|
|
|
|
||||||
= help: Replace double quotes with single quotes
|
= help: Replace double quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 1 | x = (
|
1 1 | x = (
|
||||||
2 2 | "This"
|
2 2 | "This"
|
||||||
3 |- "is"
|
3 |- "is"
|
||||||
|
|
@ -49,7 +49,7 @@ doubles_implicit.py:4:5: Q000 [*] Double quotes found but single quotes preferre
|
||||||
|
|
|
|
||||||
= help: Replace double quotes with single quotes
|
= help: Replace double quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 1 | x = (
|
1 1 | x = (
|
||||||
2 2 | "This"
|
2 2 | "This"
|
||||||
3 3 | "is"
|
3 3 | "is"
|
||||||
|
|
@ -69,7 +69,7 @@ doubles_implicit.py:8:5: Q000 [*] Double quotes found but single quotes preferre
|
||||||
|
|
|
|
||||||
= help: Replace double quotes with single quotes
|
= help: Replace double quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
5 5 | )
|
5 5 | )
|
||||||
6 6 |
|
6 6 |
|
||||||
7 7 | x = (
|
7 7 | x = (
|
||||||
|
|
@ -90,7 +90,7 @@ doubles_implicit.py:9:5: Q000 [*] Double quotes found but single quotes preferre
|
||||||
|
|
|
|
||||||
= help: Replace double quotes with single quotes
|
= help: Replace double quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
6 6 |
|
6 6 |
|
||||||
7 7 | x = (
|
7 7 | x = (
|
||||||
8 8 | "This" \
|
8 8 | "This" \
|
||||||
|
|
@ -110,7 +110,7 @@ doubles_implicit.py:10:5: Q000 [*] Double quotes found but single quotes preferr
|
||||||
|
|
|
|
||||||
= help: Replace double quotes with single quotes
|
= help: Replace double quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
7 7 | x = (
|
7 7 | x = (
|
||||||
8 8 | "This" \
|
8 8 | "This" \
|
||||||
9 9 | "is" \
|
9 9 | "is" \
|
||||||
|
|
@ -129,7 +129,7 @@ doubles_implicit.py:27:1: Q000 [*] Double quotes found but single quotes preferr
|
||||||
|
|
|
|
||||||
= help: Replace double quotes with single quotes
|
= help: Replace double quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
24 24 |
|
24 24 |
|
||||||
25 25 | if True:
|
25 25 | if True:
|
||||||
26 26 | "This can use 'double' quotes"
|
26 26 | "This can use 'double' quotes"
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ doubles_multiline_string.py:1:5: Q001 [*] Double quote multiline found but singl
|
||||||
|
|
|
|
||||||
= help: Replace double multiline quotes with single quotes
|
= help: Replace double multiline quotes with single quotes
|
||||||
|
|
||||||
ℹ Suggested fix
|
ℹ Fix
|
||||||
1 |-s = """ This "should"
|
1 |-s = """ This "should"
|
||||||
1 |+s = ''' This "should"
|
1 |+s = ''' This "should"
|
||||||
2 2 | be
|
2 2 | be
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue