-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normalization of line ending with exclusion of test directories (#8007)
Add git attributes for automatic line ending normalization. Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
- Loading branch information
1 parent
1baa10e
commit 259b3d7
Showing
15 changed files
with
49 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
* text=auto | ||
tests/**/functional/** -text | ||
tests/input/** -text | ||
tests/**/data/** -text | ||
tests/regrtest_data/** -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
x, y = input(), input() | ||
if x >= y: # [consider-ternary-expression] | ||
maximum = x | ||
else: | ||
maximum = y | ||
x, y = input(), input() | ||
if x >= y: # [consider-ternary-expression] | ||
maximum = x | ||
else: | ||
maximum = y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[MAIN] | ||
load-plugins=pylint.extensions.consider_ternary_expression | ||
[MAIN] | ||
load-plugins=pylint.extensions.consider_ternary_expression |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
x, y = 1, 2 | ||
maximum = x >= y and x or y # [consider-using-ternary] | ||
x, y = 1, 2 | ||
maximum = x >= y and x or y # [consider-using-ternary] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
def foo(): # [disallowed-name] | ||
def foo(): # [disallowed-name] | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
if input(): | ||
pass | ||
else: | ||
if len(input()) >= 10: # [else-if-used] | ||
pass | ||
else: | ||
if input(): | ||
pass | ||
else: | ||
if len(input()) >= 10: # [else-if-used] | ||
pass | ||
else: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[MAIN] | ||
[MAIN] | ||
load-plugins=pylint.extensions.check_elif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
This can happen if you're importing a package that is not installed in your environment, or if you made a typo. | ||
|
||
The solution is to install the package via pip/setup.py/wheel or fix the typo. | ||
This can happen if you're importing a package that is not installed in your environment, or if you made a typo. | ||
|
||
The solution is to install the package via pip/setup.py/wheel or fix the typo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from bad import a_function # [import-self] | ||
|
||
|
||
def a_function(): | ||
pass | ||
from bad import a_function # [import-self] | ||
|
||
|
||
def a_function(): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Another reasonable option is to use f-string. If you want to do that, you need to enable | ||
Another reasonable option is to use f-string. If you want to do that, you need to enable | ||
``logging-format-interpolation`` and disable ``logging-fstring-interpolation``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
This message permits to allow f-string in logging and still be warned of | ||
This message permits to allow f-string in logging and still be warned of | ||
``logging-format-interpolation``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
By using a generator you can cut the execution tree and exit directly at the first element that is ``False`` for ``all`` or ``True`` for ``any`` instead of | ||
calculating all the elements. Except in the worst possible case where you still need to evaluate everything (all values | ||
By using a generator you can cut the execution tree and exit directly at the first element that is ``False`` for ``all`` or ``True`` for ``any`` instead of | ||
calculating all the elements. Except in the worst possible case where you still need to evaluate everything (all values | ||
are True for ``all`` or all values are false for ``any``) performance will be better. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
https://gist.github.com/hofrob/ad143aaa84c096f42489c2520a3875f9 | ||
|
||
This example script shows an 18% increase in performance when using a literal over the | ||
constructor in python version 3.10.6. | ||
https://gist.github.com/hofrob/ad143aaa84c096f42489c2520a3875f9 | ||
|
||
This example script shows an 18% increase in performance when using a literal over the | ||
constructor in python version 3.10.6. |
16 changes: 8 additions & 8 deletions
16
doc/data/messages/u/using-final-decorator-in-unsupported-version/bad.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
from typing import final | ||
|
||
|
||
@final # [using-final-decorator-in-unsupported-version] | ||
class Playtypus(Animal): | ||
@final # [using-final-decorator-in-unsupported-version] | ||
def lay_egg(self): | ||
... | ||
from typing import final | ||
|
||
|
||
@final # [using-final-decorator-in-unsupported-version] | ||
class Playtypus(Animal): | ||
@final # [using-final-decorator-in-unsupported-version] | ||
def lay_egg(self): | ||
... |
6 changes: 3 additions & 3 deletions
6
doc/data/messages/u/using-final-decorator-in-unsupported-version/good.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
class Playtypus(Animal): | ||
def lay_egg(self): | ||
... | ||
class Playtypus(Animal): | ||
def lay_egg(self): | ||
... |