Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/Coding-Conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,14 @@ class CheeseShop:

> 🐍 This rule stems from [PEP 8](https://www.python.org/dev/peps/pep-0008)

### [N.2.5] ✔️ **DO** Use `CamelCase` for type variable names
### [N.2.5] ✔️ **DO** Use `CamelCase` for type variable names 💻

> 🐍 This rule stems from [PEP 8](https://www.python.org/dev/peps/pep-0008)

> 💻 This rule is enforced by error code N808

```python
# Bad
# Bad - will produce N808
from typing import TypeVar

flying_circus = TypeVar("flying_circus")
Expand Down
353 changes: 245 additions & 108 deletions poetry.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""example of a python file with linter errors.
"""
"""example of a python file with linter errors."""

import os

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""example of a python file with linter errors.
"""
"""example of a python file with linter errors."""

import pathlib, glob # noqa: E401, F401 - multiple imports on one line (auto-generated noqa), 'glob' imported but unused (auto-generated noqa)
import os # noqa: I100 - Import statements are in the wrong order. 'import os' should be before 'import pathlib, glob' (auto-generated noqa)
Expand All @@ -24,7 +23,7 @@

def _test_os_name():
for (
os # noqa: F402 - import 'os' from line 5 shadowed by loop variable (auto-generated noqa)
os # noqa: F402 - import 'os' from line 4 shadowed by loop variable (auto-generated noqa)
) in range(3):
print(os)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""example of a python file with linter errors in flow and structure of code.
"""
"""example of a python file with linter errors in flow and structure of code."""

l = 5 # noqa: E741 - ambiguous variable name 'l' (auto-generated noqa)
y = False
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ from typing import ( # noqa: F401 - un-used import comment that is actually use
from typing import ( # noqa F401: un-used import comment that is actually used, should get removed in --aggressive, used to test transition of comment. (auto-generated noqa)
List,
)
from typing import Iterable
from typing import (
Iterable,
)

import pytest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

import pathlib
from os import access, path
from typing import Hashable, Iterable, List
from typing import (
Hashable,
Iterable,
List,
)

import pytest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
@@ -1,7 +1,7 @@
"""This is a bad comment.""" " "

-y = 3
-y = 3
? ^
+y = 3

-# "This is a bad comment.",
-# "This is a bad comment.",
? ^
+# "This is a bad comment.",

-x = 5
-x = 5
? ^
+x = 5
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@
[
("Gerät", ["1252", "iso-8859-1", "utf-8"]),
("l' appareil", ["1252", "iso-8859-1", "utf-8"]),
\ No newline at end of file (input.py)
@@ -27,3 +29,4 @@
("设备", ["utf-8", "gbk"]),
],
)
+\ Newline at end of file