Skip to content

Commit

Permalink
docs: add ignore_names option
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrugman committed Feb 13, 2023
1 parent b962688 commit 640972f
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ define_violation!(
///
/// * `pep8-naming.classmethod-decorators`
/// * `pep8-naming.staticmethod-decorators`
/// * `pep8-naming.ignore_names`
///
/// ## Example
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ define_violation!(
///
/// ## Why is this bad?
///
/// Using `self` as first argument for instance methods is recommended by [PEP8](https://peps.python.org/pep-0008/#function-and-method-arguments):
/// Using `self` as first argument for instance methods is recommended by
/// [PEP8](https://peps.python.org/pep-0008/#function-and-method-arguments):
///
/// > Always use self for the first argument to instance methods.
/// >
Expand All @@ -26,6 +27,7 @@ define_violation!(
///
/// * `pep8-naming.classmethod-decorators`
/// * `pep8-naming.staticmethod-decorators`
/// * `pep8-naming.ignore_names`
///
/// ## Example
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ define_violation!(
/// > improve readability. mixedCase is allowed only in contexts where that’s already the
/// > prevailing style (e.g. threading.py), to retain backwards compatibility.
///
/// ## Options
///
/// * `pep8-naming.ignore_names`
///
/// ## Example
///
/// ```python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ define_violation!(
/// > is allowed only in contexts where that's already the prevailing style (e.g. threading.py),
/// to retain backwards compatibility.
///
/// ## Options
///
/// * `pep8-naming.ignore_names`
///
/// ## Example
///
/// ```python
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/invalid-argument-name.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ class MyClass:

## References

* [PEP8](https://peps.python.org/pep-0008/)
* [PEP8](https://peps.python.org/pep-0008/)
1 change: 1 addition & 0 deletions docs/rules/invalid-first-argument-name-for-class-method.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Using `cls` as first argument for class methods is recommended by [PEP8](https:/

* `pep8-naming.classmethod-decorators`
* `pep8-naming.staticmethod-decorators`
* `pep8-naming.ignore_names`

## Example

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/invalid-first-argument-name-for-method.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Checks for instance methods to have `self` as first argument.

## Why is this bad?

Using `self` as first argument for instance methods is recommended by [PEP8](https://peps.python.org/pep-0008/#function-and-method-arguments):
Using `self` as first argument for instance methods is recommended by
[PEP8](https://peps.python.org/pep-0008/#function-and-method-arguments):

> Always use self for the first argument to instance methods.
>
Expand All @@ -20,6 +21,7 @@ Using `self` as first argument for instance methods is recommended by [PEP8](htt

* `pep8-naming.classmethod-decorators`
* `pep8-naming.staticmethod-decorators`
* `pep8-naming.ignore_names`

## Example

Expand Down
4 changes: 4 additions & 0 deletions docs/rules/invalid-function-name.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ Function names should be lowercase, with words separated by underscores, is reco
> improve readability. mixedCase is allowed only in contexts where that’s already the
> prevailing style (e.g. threading.py), to retain backwards compatibility.
## Options

* `pep8-naming.ignore_names`

## Example

```python
Expand Down
4 changes: 4 additions & 0 deletions docs/rules/non-lowercase-variable-in-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Variable names in functions should be lowercase as recommended by
> is allowed only in contexts where that's already the prevailing style (e.g. threading.py),
to retain backwards compatibility.

## Options

* `pep8-naming.ignore_names`

## Example

```python
Expand Down

0 comments on commit 640972f

Please sign in to comment.